set-include-path

php relative and absolute paths

I have read that when including a php file that using a absolute paths has a faster processing time than relative paths. What would you suggest to use? include("inlcudes/myscript.php"); or include("/home/ftpuser/public_html/includes/myscript.php"); or even set_include_path("/home/ftpuser/public_html/includes"); include("myscript....

define my own BASE_PATH vs. set_include_path?

I learned of the function set_include_path(). All this time, I defined a constant in the config.php file define('BASE_PATH', '/var/www/mywebsite/public_html/'); And in all subsequent php files, I would include like so include(BASE_PATH.'header.php'); include(BASE_PATH.'class/cls.data_access_object.php'); Is there any advantage wit...

CLI include paths to run zend framework via cron

I wrote a command line utility using Zend Framework to do some nightly reporting. It uses a ton of the same functionality the accompanying site. It works great when I run it by hand, but when I run it on cron I have include path issues. Seems like it should be easily fixed with set_include_path, but maybe I'm missing something? My direc...

Include path and weird structure

Hai. I've got site which is really weird, and now is making me troubles. This is simplified structure public_html - adm --- raport ------ raportpdf.php --- class ------ Bonus --------- Bonus_DAO.class.php ------ config.php --- raport.php - index.php So. Index.php is giant loader. It has lines: (but I don't think that they are making ...

Dealing with PHPUnit path issues.

I am getting the following error when I try to run PHPUnit from within my current MVC framework application Fatal error: Cannot redeclare class PHPUnit_Util_FilterIterator in /usr/local/pear/PHPUnit/Util/FilterIterator.php on line 162 I've managed to trace that error to a combination of a few things. $paths = array(); $paths[] = '../...

Having a problem with namespaces and set_include_path() in PHP

C:\xampp\htdocs contains Controller.php and ApplicationHelper.php. C:\xampp\htdocs\site contains index.php. Here is the error I am getting: Fatal error: Class 'site\controller\ApplicationHelper' not found in C:\xampp\htdocs\Controller.php on line 17 I'm new to the whole namespaces business but I'm not 100% sure that thats whats behin...

Where PHP "set_include_path" is effective ?

I would like to add my_path to include_path and include files relatively to my_path. Is that enough to set the include_path using set_include_path in the main PHP file of my website, or I must do this in every PHP file ? ...