Re: Read file on file system

From: Date: Sun, 04 Feb 2007 15:36:42 +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-248288@lists.php.net to get a copy of this message
file_get_contents takes a file name as an argument, not an opened file handle. ----- Original Message ----- From: "Bagus Nugroho" <bnugroho@aitemail.com> To: "Stut" <stuttle@gmail.com>; <php-general@lists.php.net> Sent: Sunday, February 04, 2007 3:45 PM Subject: RE: [PHP] Read file on file system 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); //////// Thxs and rgds bn -----Original Message----- From: Stut [mailto:stuttle@gmail.com] Sent: Sun 04-Feb-2007 21:14 To: Bagus Nugroho Cc: php-general@lists.php.net Subject: Re: [PHP] Read file on file system Bagus Nugroho wrote:
If I have file on[windows] c:\test.csv. How I can read the entire contents of this file? I have try file_get_contents, fgetcsv and etc but didn't work. May I'm mis-understanding about using those function.
Well, from examining the code you included in your post, and reading the output you're seeing, I have determined that... ahh, hang on a second, I've started seeing code where no code exists. Is that a bad thing? Should I see someone? -Stut

« previous php.general (#248288) next »