RE: Spurious newlines when requesting empty php file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Richard Lynch wrote:
> Carl Michael Skog wrote:
>> I would have thought that the response from a empty php file would
>> also be empty, but, to my surprise, they consist of 3 newlines !!!
>
> I just tried this with an empty PHP file, and got exactly what I
> expected.
>
> A valid response with no content at all.
>
> Please specify your software versions, and provide URLs and, as silly
> as this sounds, an "ls -als empty.php" so we can see your empty PHP
> file.

Maybe he's using "lynx -dump <url>" to test this.  Lynx adds several newlines to the
output.  However, Links does not:

$ touch empty.php
$ lynx -dump http://localhost/empty.php | od -c
0000000  \n  \n  \n
0000003
$ links -dump http://localhost/empty.php | od -c
0000000

Just to add to the guessing... :)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux