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....
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...
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...
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 ...
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[] = '../...
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...
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 ?
...