I've noticed in both of your posts that you aren't terminating the line before the include with a ;
Yup, thanks!
Then I fixed my global problem without bugging you guys too. Final result:
#call.php $dirstr= "./"; include 'scandir.php'; scandir('$dirstr');
#scandir.php
function scandir($dirstr) {
global $dirstr; #I HAD TO ADD THIS LINE ALSO
$files = array();
$fh = opendir($dirstr);
while (false !== ($filename = readdir($fh))) {
array_push($files, $filename);
}
closedir($fh);
return $files;
}> FYI... > If you use / then you don't have to escape it like // only the \. > Also, instead of ".\\" you can use '.\'
Ah ha! that explains my confusion :-)
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

