why don't you just do this?
***
?php
if(file_exists(setup.txt)){
$lines=file(setup.txt);
echo stripslashes($lines[0]);
}
else echo Error opening \setup.txt\;
?
***
file() returns the file in an array, each line as new value, so line nr.
1 is $line[0], line nr. 2 is $line[1] etc...
I added
At 6/19/2003 10:41 PM, Kyle Babich wrote:
Inside of another file I'm trying to read setup.txt into $rawSetupData
and explode that with \r\n's
into an array called $setupData.
Why on earth?
http://us4.php.net/file
?php
if (file_exists(setup.txt)) {
$rawSetupData = readfile(setup.txt);
2 matches
Mail list logo