Does file_get_contents() not work with absolute paths? I'm able to successfully write data to a file that I create dynamically but when I go back to actually read the contents of the file, nothing seems to work. Not file_get_contents(), not file(), not fread() and not fgets();

$mydata = 'joebobbriggs';
$filename = 'c:\\temp\\my_file_name.txt';
$resource = fopen( $filename, 'w+' );
fwrite( $resource, $mydata );
fclose( $resource );

echo 'File data: ' . file_get_contents( $filename );

Nothing gets displayed but I see that the file was created and that it has the data I defined.

What's going on?

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

Reply via email to