Thursday, July 30, 2009

Is there any issues over directory seperators in php?

If a website is hosted on a Windows machine and I write:


include '../myfile.php';





will this cause a problem?

Is there any issues over directory seperators in php?
It's gonna work fine on both Windows and Linux platforms . The only difference between these two while including a file is that file names are case sensetive in Linux .


Suppose your file name is "MYfIlE.phP" and you're running your code on a Linux machine ,then your code must be like this :


include('../MYfIlE.phP');





In a Windows machine it doesn't matter whether you write it in Upper case and or Lower case.


No comments:

Post a Comment