Re: PHP Always Outputs [message #178627 is a reply to message #178625] |
Sat, 14 July 2012 13:19 |
Jerry Stuckle
Messages: 2598 Registered: September 2010
Karma:
|
Senior Member |
|
|
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.
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.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
|
|
|