in windows (using apache as server), my file path directory will be C:\xampp\htdocs\mysvn\PhpDocumentor\phpdoc.php. But what happen with other OS such as linux on APACHE, or IIS on windows, Or other OS i don’t know and never use ?
i would like to know to make sure i wrote the bullet proof, file reading via PHP.
Care anyone give an example path according to different OS and Server ?
I often create a configuration file for each project, and inside that define some paths in a few constants. Use those constants any time you want to include files from then on:
Though Windows typically uses backslashes as path separators, it’s smart enough to handle both, so using forward slashes is safe.