2007 7:55 PM
To: php-general
Subject: [PHP] Opening a file
Good Morning!
Opening this file is proving to be a pain. I have a folder that contains a
PHP page and a text file. I am trying to open the contents of the txt file
using file() but it keeps erroring out. Below is the code I'm using to tr
Ah, okay.
Would this also work if I wanted to apply this to multiple other pages
located within different areas of the site tree?
On 9/5/07, Stut <[EMAIL PROTECTED]> wrote:
>
> Dan Shirah wrote:
> > So:
> > fruits.txt is contained in the same folder as mypage.php.
> > mypage.php tries to pull th
Dan Shirah wrote:
Good Morning!
Opening this file is proving to be a pain. I have a folder that contains a
PHP page and a text file. I am trying to open the contents of the txt file
using file() but it keeps erroring out. Below is the code I'm using to try
and open it:
So, I'm setting my vari
Dan Shirah wrote:
So:
fruits.txt is contained in the same folder as mypage.php.
mypage.php tries to pull the data contained in fruits.txt to see if the
data matches
toppage.php has mypage.php inserted as an include and checks for the
result of $a and processes accordingly.
In that case your C
Toppage.php -
LOTS OF HTML
Mypage.php -
LOTS OF HTML
So:
fruits.txt is contained in the same folder as mypage.php.
mypage.php tries to pull the data contained in fruits.txt to see if the data
matches
toppage.php has mypage.php inserted as an include and checks for the result
of $a and proce
Dan Shirah wrote:
I did a
if ($lines === false) {
echo "lines is false";
}
like you suggested and it displays that text...but it still make no sense.
mypage.php and fruits.txt are in the same folder, on the same server. There
isn't any permissions issues.
So, if mypage.php and fruits.txt are
mypage.php and fruits.txt have the same permissions.
The IUSR(internet user) account has the following permissions:
Read & Execute
Read
On 9/5/07, Jay Blanchard <[EMAIL PROTECTED]> wrote:
>
> [snip]
> I did a
>
> if ($lines === false) {
> echo "lines is false";
> }
>
> like you suggested and i
[snip]
I did a
if ($lines === false) {
echo "lines is false";
}
like you suggested and it displays that text...but it still make no
sense.
mypage.php and fruits.txt are in the same folder, on the same server.
There
isn't any permissions issues.
So, if mypage.php and fruits.txt are in the same fo
I did a
if ($lines === false) {
echo "lines is false";
}
like you suggested and it displays that text...but it still make no sense.
mypage.php and fruits.txt are in the same folder, on the same server. There
isn't any permissions issues.
So, if mypage.php and fruits.txt are in the same folder,
Hi Dan,
Wednesday, September 5, 2007, 3:24:43 PM, you wrote:
> Opening this file is proving to be a pain. I have a folder that contains a
> PHP page and a text file. I am trying to open the contents of the txt file
> using file() but it keeps erroring out. Below is the code I'm using to try
> and
Good Morning!
Opening this file is proving to be a pain. I have a folder that contains a
PHP page and a text file. I am trying to open the contents of the txt file
using file() but it keeps erroring out. Below is the code I'm using to try
and open it:
So, I'm setting my variable, opening my fil
Todd,
if that script is the result of a link being follwed, add target="blank" to
the end.
George
> -Original Message-
> From: Todd Cary [mailto:[EMAIL PROTECTED]
> Sent: 10 March 2003 5:28 pm
> To: [EMAIL PROTECTED]
> Subject: [PHP] Opening a file in a new wind
Thanks to your help, this now is working:
/* Validate session_id here */
header("Content-type: text/html");
header("Content-Disposition: filename=" . $filename);
$fp = fopen($filename, "r");
if($fp) {
fpassthru($fp);
fclose($fp);
}
?>
Now I would like to open the file in a new windo
hi all,
i have a problem:
i am opening and reading and writing a file through php page.
$fp = fopen("\bdoi_change\andar.html", "w");
fwrite($fp, "dikshai
solved problem!");
but when i try to open "\bdoi_change\andar.html" through
internet explorer, i am getting "page cannot be displayed".
pl
- Original message -
From: "Troy May" <[EMAIL PROTECTED]>
To: "@ Edwin" <[EMAIL PROTECTED]>
Date: Sat, 16 Nov 2002 21:45:50 -0800
Subject: RE: [PHP] Opening a file to manipulate it
Thanks Ed! Yes, another member here told me to use fread(), which is
what
your
bject: Re: [PHP] Opening a file to manipulate it
Hello,
"Troy May" <[EMAIL PROTECTED]> wrote:
> Hello,
>
> Extreme newbie here (halfway through my first book :) ). I need to open a
> file, read the whole file into a variable, manipulate it, and then echo it
> to the
Hi,
on 17/11/02 1:45 PM, Troy May ([EMAIL PROTECTED]) wrote:
>
> echo $header; ?>
>
> It writes "Resource id #1" at the top of the page. What is that?! :)
You're missing some code -- instead, try this example from the fread() page
in the manual:
Cheers,
Justin French
-
Hello,
"Troy May" <[EMAIL PROTECTED]> wrote:
> Hello,
>
> Extreme newbie here (halfway through my first book :) ). I need to open a
> file, read the whole file into a variable, manipulate it, and then echo it
> to the screen. I'm doing it right from my book and it's not working.
> Here's what I
Hello,
Extreme newbie here (halfway through my first book :) ). I need to open a
file, read the whole file into a variable, manipulate it, and then echo it
to the screen. I'm doing it right from my book and it's not working.
Here's what I have now:
It writes "Resource id #1" at the top of the
19 matches
Mail list logo