RealPath returns an empty string
- by Abs
Hello all,
I have the following which just loops through the files in a directory and echo the file names. However, when I use realpath, it returns nothing. What am I doing wrong:
if ($handle = opendir($font_path)) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != ".." && $file != "a.zip") {
echo $file.'<br />';//i can see file names fine
echo realpath($file);// return empty string?!
}
}
closedir($handle);
}
Thanks all for any help on this.
~I am on a windows machine, running php 5.3 and apache 2.2.