Re: Read file on file system

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

 



Bagus Nugroho wrote:
in simple like this
////////
$filename = "d:\\test.csv";
$openfile = fopen($filename,'r');
$readfile = fread($openfile,filesize($filename);

echo $readfile

....
or like this
.....

echo file_get_contents($openfile);

.....
echo fgetcsv($openfile);

Try this...

<?php
    $filenane = "d:\\test.csv
    if (file_exists($filename))
        echo file_get_contents($filename);
    else
        echo 'File not found';
?>

...and nothing else. Do you get any errors? Are errors turned on in php.ini?

-Stut

--
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