开发者

How to autocomplete path to include file with solid prefix?

in Netbeans, when I start writing absolute path to file I get autocomplete for path. e.g. 开发者_如何学编程when write:

require_once "D:/www/"

and I get autocomplete for path to file e.g.:

..
project1/
project2/
file1.php
file2.php

But when I use constant or variable prefix to path, e.g.:

class Tools{
    // const
    const PATH_TO_PROJECT = 'D:/www/project1/';
    // or variable
    public $pathToProject = 'D:/www/project1/';
}

and write:

require_once Tools::PATH_TO_PROJECT . '';
// or
$tools = new Tools();
require_once $tools->pathToProject . '';

I don't get autocomplete. Is there any way how to achieve autocomplete for this style of includes? Or is there more elegant way to do this?

And what about Auto including Classes. Is there some good library for this: I prefer something more modular.

Thank's for help and excuse my basic English.

With the wishes of a beautiful day

Radek


You can set include_path the code should be something like:

ini_set('include_path', ini_get('include_path').PATH_SEPARATOR.'D:/www/project1/');
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜