![]() |
| PHP readdir and opendir don't work? |
|
shmoo
|
So I'm trying to use the following code snippet from the PHP.net website...
...and I keep getting the following error message... Warning: opendir() [function.opendir]: SAFE MODE Restriction in effect. The script whose uid is 72582 is not allowed to access / owned by uid 0 in /vservers/mywebsite/htdocs/programming/index.php on line 37 Warning: opendir(/calculator) [function.opendir]: failed to open dir: No such file or directory in /vservers/mywebsite/htdocs/programming/index.php on line 37 I'm still a bit new to PHP so can someone tell me what's going wrong? Oh, and I'm on a shared server. I guess this is a permissions issue, but Dreamweaver doesn't seem to be letting me change permissions on the directory. Thanks |
||||||||||||||
|
|
|||||||||||||||
|
shmoo
|
Nevermind, I figured it out. In the line:
opendir('/calculator') you can't have the "/" in front of calculator. It works fine if you use: opendir('calculator') or even opendir('.') if you want it to read the current directory. I still don't know why Dreamweaver isn't letting me change permissions, however. |
||||||||||||
|
|
|||||||||||||
| PHP readdir and opendir don't work? |
|
||
|


