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:

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


PHP General Mailing List (
To unsubscribe, visit:

Reply via email to