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
""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];
>>
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 == '
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";
> > ?>
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 =
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
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
> 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
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
> 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
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
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,
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
13 matches
Mail list logo