PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
This is a simple question. I'm trying to get this PHP script to open a file on a Linux system, and the file is not in the htdocs directory, rather it's in the main hard drive area. If the file was somewhere like: "C:\folder1\text.txt", how would the syntax go for the file? It doesn't seem to work the same way as it did in Windows.
Hey, thanks for the reply. I noticed you put /somewhere, what would somewhere be? The drive it's in? Also, wouldn't /somewhere tell it to look for that folder in the htdocs directory?
In linux / is root of the file system node, so all other directories are in this one. /home/blah will start from the root of the file system and not the directory you are in. The usual rules then apply where ../ is one dir back up the tree and no / is the current directory.