Re: [PHP] file( ) function

2006-06-07 Thread Mayank Maheshwary
Yes, that is actually $temp, not $temp1. However, my problem still remains the same. Several lines in the file contain the exact same string as the one I am comparing. I need their positions in the array so that I can operate on other lines in the file. That is why I am using file( ) instead of o

Re: [PHP] file( ) function

2006-06-07 Thread Jo�o C�ndido de Souza Neto
""Rabin Vincent"" <[EMAIL PROTECTED]> escreveu na mensagem news:[EMAIL PROTECTED] > On 6/8/06, Mayank Maheshwary <[EMAIL PROTECTED]> wrote: >> $name = $_POST["filename"]; >> $lines = file($name); >> $i = 0; >> $len = sizeof($lines); >> //echo $i; >> while($i < $len) { >> //echo $lines[$i]; >>

Re: [PHP] file( ) function

2006-06-07 Thread Rabin Vincent
On 6/8/06, Mayank Maheshwary <[EMAIL PROTECTED]> wrote: $name = $_POST["filename"]; $lines = file($name); $i = 0; $len = sizeof($lines); //echo $i; while($i < $len) { //echo $lines[$i]; $temp = $lines[$i]; $temp = trim($temp); //echo $temp; if($temp1 == '

Re: [PHP] file function

2005-07-11 Thread Joseph Lee
I see. Now I know how it works. Thank you, all, for your great help. Joe --- Burhan Khalid <[EMAIL PROTECTED]> wrote: > Joseph Lee wrote: > > Hi, > > > > I tried file() in the following lines: > > > > >$authFile = file("/tmp/authenticate.txt"); > >print "authFile = $authFile"; > > ?>

Re: [PHP] file function

2005-07-10 Thread Burhan Khalid
Joseph Lee wrote: Hi, I tried file() in the following lines: However, it only gave me authFile = Array What's wrong with this file function? I tried single quotes, but got the same answer, too. Nothing. You need to read the documentation. What you probably wanted was: print "authFile =

Re: [PHP] file function

2005-07-09 Thread Rory Browne
On 7/9/05, Joseph Lee <[EMAIL PROTECTED]> wrote: > Hi, > > I tried file() in the following lines: > >$authFile = file("/tmp/authenticate.txt"); > print "authFile = $authFile"; > ?> > > However, it only gave me > authFile = Array > > What's wrong with this file function? I tried single > q

Re: [PHP] file function

2005-07-08 Thread Ezra Nugroho
Well, it supposed to give you array. http://us2.php.net/manual/en/function.file.php array file ( string filename [, int use_include_path [, resource context]] ) What do you want exactly? Ezra On Fri, 2005-07-08 at 16:34 -0700, Joseph Lee wrote: > Hi, > > I tried file() in the following lin

Re: [PHP] File() function and require()

2003-01-16 Thread 1LT John W. Holmes
> OK, I have a file called page.php that has the following code in it > (example but same layout and concept). > > > require("membercheck.php"); > ?> > > > Page Title > > > This is the text in the body of the page. > > > > The membercheck.php file contains a login for

RE: [PHP] File() function and require()

2003-01-16 Thread Mike Tharp
OK, I have a file called page.php that has the following code in it (example but same layout and concept). Page Title This is the text in the body of the page. The membercheck.php file contains a login form that is used if a session variable doesn't exist, i.e. the user

RE: [PHP] File() function and require()

2003-01-15 Thread John W. Holmes
> How can I get the file() function to ignore the first three lines of a > file it is reading in? > > I have a site with: > > require("membercheck.php"); > ?> > ... rest of file > > > > at the top of all the pages to control user logins. The problem is the > file() function only reads

RE: [PHP] file function. please help..

2001-07-06 Thread Don Read
On 07-Jul-01 Doron wrote: > hello. > how can i make the file function to put the first 9 lines, in values > 01, 02, 03, 04, 05, 06, 07, 08, 09 > instead of > 1, 2, 3, 4, 5, 6, 7, 8, 9? > file ? numbers ? ... gotta be the example from the manual (somebody reads it, Halleluja!). Have you looked

Re: [PHP] file function. please help..

2001-07-06 Thread ReDucTor
huh, explain a little more??? - Original Message - From: Doron <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, July 07, 2001 6:09 PM Subject: [PHP] file function. please help.. > hello. > how can i make the file function to put the first 9 lines, in values > 01, 02, 03, 04,

Re: [PHP] file() function

2001-03-09 Thread Richard Lynch
At the very end: //> @readfile(basename(($PHP_SELF . ".comment"))); > > ?> $lines = file(($PHP_SELF . ".comment"))); for ($i = 0; $i < 30; $i++){ echo $lines[$i], "\n"; } -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/art