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… (Continue)
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… (Continue)
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… (Continue)