Re: Read file on file system

From: Date: Sun, 04 Feb 2007 14:51:57 +0000
Subject: Re: Read file on file system
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-248282@lists.php.net to get a copy of this message
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

« previous php.general (#248282) next »