Re: EOF (End of File) character..
| From: | Richard Lynch | Date: | Mon, 19 Feb 2001 07:20:24 +0000 |
| Subject: | Re: EOF (End of File) character.. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-40531@lists.php.net to get a copy of this message | ||
I think EOF depends on the application/OS...
Try chr(26) [Control-Z] and chr(4) [Control-D]
Or have I just been using too many Un*x programs that can't agree on how to
indicate the end of my typing? :-^
If those don't work, try everything below 32.
Well, okay, I *know* it's not 9, 10, or 13 :-)
If all else fails, take a file that works, and get PHP to read it char by
char...
Hey, maybe you just need a newline at the end!
"\n" (aka chr(13))
Or, in Windoze, "\r\n" (aka chr(10) . chr(13))
--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
----- Original Message -----
From: "David Bouw" <maillist@mubo.nl>
Newsgroups: php.general
Sent: Sunday, February 18, 2001 5:17 AM
Subject: [PHP] EOF (End of File) character..
> Hi...
>
> How do I get an EOF character when echo'ing an web page which will be
> written to an file.??
>
> What I am trying to do is the following. I have an textstring (variable):
>
> Then I do the following:
>
> header("Content-disposition: filename=CLIEOP03");
> header("Content-type: application/octetstream");
> header("Pragma: no-cache");
> header("Expires: 0");
> echo ("$datestring");
>
> ($datastring contains the text)
>
> My browser pops up with a box to ask if I want to save this file..
>
> The problem is, that when I save this file it has no EOF character at the
> end.. Normally I then use my text editor to open the file and then I just
> save it again to get the needed character.. I generate this file for an
> application..
>
> The problem is that the application won't accept the file if there is no
EOF
> character..
>
> What is the correct characters to use to get an EOF character??
>
> Thanks for the help..
>
> Bye Bye
> David
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>