Results 1 to 4 of 4
Thread: getting file/directories info
May 25, 2005, 16:17 #1
getting file/directories info
How can I get the permissions of a file or a directory through Php? E.g if I chmod a directory "test" on my server to:
How can i get what I just chmoded it to through Php?
May 25, 2005, 16:19 #2
May 25, 2005, 16:41 #3
What I'm trying to do is:
- Take a file or directory's Chmod value
- Chmod the file or directory to 777
- After some other code, chmod the file back to its original value
The function fileperms() returns the values such as 33188, 16895, etc instead of 0777 or 0750. Does anybody know of any function which will return its values in a format which I can use in the Chmod function again?
May 25, 2005, 16:45 #4
echo substr(sprintf('%o', fileperms('url')), -4);