Hi
I have created a virtual directory in IIS 7. The virtual directory is named "sites" and points to "C:\sites".
I want PHP to manipulate the files in this directory but I get the following error message when PHP tries to read it like this:
echo '<pre>';
$dir = scandir( 'sites' );
print_r( $dir );
echo '</pre>';
PHP Warning: scandir(sites) [function.scandir]: failed to open dir: No error in C:\inetpub\wwwroot\homebuild\test.php on line 15 PHP Warning: scandir() [function.scandir]: (errno 0): No error in C:\inetpub\wwwroot\homebuild\test.php on line 15
But if I use an absolute path it works fine:
echo '<pre>';
$dir = scandir( 'C:\sites' );
print_r( $dir );
echo '</pre>';
I can also browse to files within the folder using my browser without a problem ( http://mysite/sites/myfile.gif).
Looking at phpinfo(), there is a line that reads:
Virtual Directory Support: disabled
Is that relevant? And if so, where do I change it?
Thank you