FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » PHP Always Outputs
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: PHP Always Outputs [message #178632 is a reply to message #178630] Sat, 14 July 2012 14:51 Go to previous messageGo to previous message
Luuk is currently offline  Luuk
Messages: 329
Registered: September 2010
Karma:
Senior Member
On 14-07-2012 16:21, Luuk wrote:
> On 14-07-2012 15:19, Jerry Stuckle wrote:
>> On 7/14/2012 4:54 AM, Luuk wrote:
>>> On 14-07-2012 06:21, Ryan wrote:
>>>> I want a php script to run and simply output nothing. But even this
>>>> script:
>>>>
>>>> <?php
>>>> ?>
>>>>
>>>> will output this html
>>>>
>>>> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
>>>> <HTML><HEAD>
>>>> <META content="text/html; charset=windows-1252"
>>>> http-equiv=Content-Type></HEAD>
>>>> <BODY></BODY></HTML>
>>>>
>>>> Is there a setting somewhere in my php or apache config that needs to
>>>> be turned off?
>>>>
>>>
>>> no, PHP will not output what you said.
>>>
>>> The output you see is generated by apache.....
>>>
>>> ~/tmp> cat empty.php
>>> <?php
>>> ?>
>>> ~/tmp> php -f empty.php
>>> ~/tmp>
>>>
>>>
>>
>> No, Apache does not generate HTML.

oops, i should have typed:
The output you see is 'problably' generated by apache?.....


>>
>> Additionally, PHP generates different output (the appropriate response
>> headers) when run as module or CGI than when run as a CLI. But it will
>> not generate HTML on its own.

so, in this case PHP will not output anyythingm

>>
>
>
> ~/tmp> vi ../public_html/empty.php
> ~/tmp> wget -S "http://www.example.com/~luuk/empty.php" -O output.txt
> asking libproxy about url 'http://www.example.com/~luuk/empty.php'
> libproxy suggest to use 'direct://'
> --2012-07-14 16:18:07-- http://www.example.com/~luuk/empty.php
> Resolving www.example.com (www.example.com)... 192.168.178.250
> Connecting to www.example.com (www.example.com)|192.168.178.250|:80...
> connected.
> HTTP request sent, awaiting response...
> HTTP/1.1 200 OK
> Date: Sat, 14 Jul 2012 14:18:07 GMT
> Server: Apache/2.2.21 (Linux/SUSE)
> X-Powered-By: PHP/5.3.8
> Content-Length: 0
> Keep-Alive: timeout=15, max=100
> Connection: Keep-Alive
> Content-Type: text/html
> Length: 0 [text/html]
> Saving to: `output.txt'
>
> [ <=>
> ] 0 --.-K/s in 0s
>
> 2012-07-14 16:18:07 (0.00 B/s) - `output.txt' saved [0/0]
>
>
> Legnth is 0 bytes, so i'm sure no one is interested in the output.... ;)
>

remains the question from the OP

if PHP does not do it (as proved above),
i'm sure someone will say:
"This output is not caused by PHP, so 'ask somewhere else'"

@Ryan:

where did you see this:"<!DOCTYPE HTML PUBLIC....."
Did you start Internet Explorer, and looked at 'view source'???????
In that case, the HTML was created by IE

--
Luuk
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Business Developer for IT company
Next Topic: decode encoded url
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Nov 26 00:53:16 GMT 2024

Total time taken to generate the page: 0.04355 seconds