Re: [PHP] Read file on file system

2007-02-04 Thread Richard Lynch
On Sun, February 4, 2007 7:47 am, 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. Define "didn't work" Becau

Re: [PHP] Read file on file system

2007-02-04 Thread Satyam
file_get_contents takes a file name as an argument, not an opened file handle. - Original Message - From: "Bagus Nugroho" <[EMAIL PROTECTED]> To: "Stut" <[EMAIL PROTECTED]>; Sent: Sunday, February 04, 2007 3:45 PM Subject: RE: [PHP] Read file on f

Re: [PHP] Read file on file system

2007-02-04 Thread Stut
Stut wrote: $filenane = "d:\\test.csv Oops... $filename = "d:\\test.csv"; -Stut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Read file on file system

2007-02-04 Thread Stut
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... ...and not

RE: [PHP] Read file on file system

2007-02-04 Thread Bagus Nugroho
bn -Original Message- From: Stut [mailto:[EMAIL PROTECTED] 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

Re: [PHP] Read file on file system

2007-02-04 Thread Satyam
ot;Bagus Nugroho" <[EMAIL PROTECTED]> To: Sent: Sunday, February 04, 2007 2:47 PM Subject: [PHP] Read file on file system Hi All, 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'

Re: [PHP] Read file on file system

2007-02-04 Thread Stut
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 readin

[PHP] Read file on file system

2007-02-04 Thread Bagus Nugroho
Hi All, 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. Thanks in advance Regards, bn