开发者

How can I set the include path in CodeIgniter Framework?

How can I set the inclu开发者_如何学Cde path in CodeIgniter Framework?

And what's the default value?


  ini_set('include_path',   ini_get('include_path') . PATH_SEPARATOR . APPPATH .'libraries');

you can read full wiki example - how to add include path for Pear Library

http://codeigniter.com/wiki/PEAR_integration/


Include paths have nothing to do with your framework: they're server settings, you can edit them via php.ini, .htacces or using ini_set("include_path", "/path/relative/to/webroot").

Also, it's kind of weird to directly use include() in such a framework: isn't that what helpers and libraries are for?


I'm guessing the default is PHP's include_path.

And, to change the include_path, you can either :

  • Edit your php.ini file,
  • Or use the set_include_path() function.


I don't know what the include path mean here. If you mean BASEPATH or APPPATH, they are set in index.php in the root directory.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜