Archive

Posts Tagged ‘include’

PHP require/include and relative path error

Jan 7th, 2010

It is little difficult to get the right path in PHP sometime. PHP gets the path based on top page. To get the right path two functions are very useful – getcwd() and realpath(). To get what PHP is understanding of your supplied path for require/include, use realpath(). It will… READ MORE

Get All Included Files in PHP

Nov 15th, 2009

Want to know how many files are included in the current PHP script? Multiple files can be included in a single include file on a PHP script using include(), include_once(), require() and require_once().
- A.php
includes B.php
B.php
includes C.php, D.php etc
Now, file1.php can have multiple files and few… READ MORE

How to Set Default File Path for Include Files?

Nov 15th, 2009

Included/required files will be searched in include path when not found in current directory or given path. This Path will act like a default path for all files included using include, require, require_once and include_once.
For lots of files residing in a deep directory and you want to set include… READ MORE