file_get_contents

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux