Man In The Box wrote:
> hmm i seem to be having a problem with opendir(). perhaps one of you
> could shed some light on the subject.
>
> here is the line of code (practically right out of the documentation)
>
> if ($handle = opendir('$_SERVER[DOCUMENT_ROOT]/files/$dir')) {
>
> blah blah blah;
> }

Because you are using single quotes (') the line don't get parsed, and the
directory you're pointing at is:
$_SERVER[DOCUMENT_ROOT]/files/dir

That doesn't seems correct to me, because the $_SERVER part won't be
replaced by the actual value. Use
$_SERVER['DOCUMENT_ROOT'] . '/files/dir'    OR
"$_SERVER['DOCUMENT_ROOT']/files/dir" instead

HTH
Erwin


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to