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

[PHP] file( ) function

2006-06-07 Thread Mayank Maheshwary
Hi, I am facing some trouble with the file( ) function. I understand that it returns the contents of the file in an array. Also, I am able to print the lines using the echo function. However, whenever I try to compare the contents of an array using strcmp, or ==, the page simply keeps 'loading',

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

[PHP] file function

2005-07-08 Thread Joseph Lee
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. Thanks, Joe Sell on Yahoo! Auctions – no fees

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

[PHP] File() function and require()

2003-01-15 Thread Mike Tharp
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: ... rest of file at the top of all the pages to control user logins. The problem is the file() function only reads in the contents of that file, not the rest of the contents af

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 value

[PHP] file function. please help..

2001-07-06 Thread Doron
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? 10x... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROT

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

[PHP] file() function

2001-03-04 Thread Felipe Lopes
I found this script on the internet...It's a script of a message board...My problem is that I just want to display the 30 newer messages stead of all messages...What do I have to change??? I tried to use the file() function...I know it's possible to do what I want to with that function, but