RE: [PHP] Opening a file

2007-09-07 Thread Sanjeev N
: Dan Shirah [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 05, 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

[PHP] Opening a file

2007-09-05 Thread Dan Shirah
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: ?php $fruit = apple); $lines =

Re: [PHP] Opening a file

2007-09-05 Thread Richard Davey
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

Re: [PHP] Opening a file

2007-09-05 Thread Dan Shirah
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,

RE: [PHP] Opening a file

2007-09-05 Thread Jay Blanchard
[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

Re: [PHP] Opening a file

2007-09-05 Thread Dan Shirah
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 it displays

Re: [PHP] Opening a file

2007-09-05 Thread Stut
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

Re: [PHP] Opening a file

2007-09-05 Thread Dan Shirah
Toppage.php - ?php include 'Process/order/mypage.php'; if ($a !=Y) { echo ; } else { ? LOTS OF HTML ?php } ? Mypage.php - ?php $fruit = echo apple; $lines = file(users.txt); if (in_array($fruit,$lines)) { $a = Y; } else { ? LOTS OF HTML ?php } ? So: fruits.txt is contained in the same

Re: [PHP] Opening a file

2007-09-05 Thread Stut
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

Re: [PHP] Opening a file

2007-09-05 Thread brian
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: ?php $fruit = apple);

Re: [PHP] Opening a file

2007-09-05 Thread Dan Shirah
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 the data

[PHP] Opening large file problem - fopen

2003-12-15 Thread Kim Steinhaug
Hello Im having real problems working with large files in PHP. At the moment Im trying to parse an error_log file, and it works like a charm, except that the scipt stopps after parsing around 70.000 lines, or around 8MB of data. Im using this : $file= error_log; // 280MB file

[PHP] Opening a file in a new window

2003-03-10 Thread Todd Cary
Thanks to your help, this now is working: ? $session_id = $HTTP_POST_VARS[session_id]; $filename= $HTTP_POST_VARS[filename]; /* Validate session_id here */ header(Content-type: text/html); header(Content-Disposition: filename= . $filename); $fp = fopen($filename, r); if($fp)

RE: [PHP] Opening a file in a new window

2003-03-10 Thread George Pitcher
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 window Thanks to your help

[PHP] opening a file from internet explorer

2003-02-18 Thread DIKSHA NEEL
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, htmlheadtitlediksha/title/headbodyh1i solved problem!/body/html); but when i try to open \bdoi_change\andar.html through internet explorer, i am

Re: [PHP] opening tex file

2003-01-17 Thread Jason Wong
On Friday 17 January 2003 20:59, Artur Bereniewicz wrote: how can I open text file and start reading in the middle of it? AFAIK it's not possible to jump directly into the middle of a file and start reading. You would have to read it line-by-line until you get to the part you're interested

Re: [PHP] opening tex file

2003-01-17 Thread Chris Hayes
At 14:05 17-1-2003, you wrote: On Friday 17 January 2003 20:59, Artur BereÂśniewicz wrote: how can I open text file and start reading in the middle of it? AFAIK it's not possible to jump directly into the middle of a file and start reading. You would have to read it line-by-line until you

RE: [PHP] Opening a file to manipulate it

2002-11-20 Thread Troy May
- From: @ Edwin [mailto:[EMAIL PROTECTED]] Sent: Saturday, November 16, 2002 9:29 PM To: Troy May Cc: [EMAIL PROTECTED] Subject: 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

RE: [PHP] Opening a file to manipulate it

2002-11-20 Thread Tarsy
[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 link led to if you're not using the CVS version of PHP. (whatever that is) I

[PHP] Opening a file to manipulate it

2002-11-16 Thread Troy May
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: ? $header = fopen(header.html,r); echo

Re: [PHP] Opening a file to manipulate it

2002-11-16 Thread @ Edwin
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 have now:

Re: [PHP] Opening a file to manipulate it

2002-11-16 Thread Justin French
Hi, on 17/11/02 1:45 PM, Troy May ([EMAIL PROTECTED]) wrote: ? $header = fopen(header.html,r); 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: ?php // get

[PHP] opening pdf file in new window with a POST operation

2002-07-03 Thread Pete James
This is a strange one... h1test/h1 form action=https://my.server/reports.php; method=post target=_blank input type=text value='1' name=pdf_client_num input type=text value='q1_2002' name=pdf_time_period input type=text value='reports' name=task input type=text value='pdf' name=report_type input