This is a discussion on PHP path shows on web page when script is executed within the PHP Language forums, part of the PHP Programming Forums category; Hi all, So this is an aesthetic question, the code all works, thank goodness. The issue is that whenever I ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi all,
So this is an aesthetic question, the code all works, thank goodness. The issue is that whenever I call/execute my php scripts, which all require the path as the first line, i.e., #!/usr/pubsw/bin/php ... and I want to know why that line shows up on the web browser?! (None of the other code shows, except for whatever other html things that are supposed to show). My "workaround" at the moment is to have <body text="FFFFFF"> which makes it white like the background, but there's gotta be a reason for this, right? :-) Any ideas? Thanks, Kerri |
|
|||
|
On 18 Feb 2005 10:49:34 -0800, kerri.cahoy@gmail.com wrote:
>So this is an aesthetic question, the code all works, thank goodness. > >The issue is that whenever I call/execute my php scripts, which all >require the path as the first line, i.e., #!/usr/pubsw/bin/php ... and >I want to know why that line shows up on the web browser?! (None of the >other code shows, except for whatever other html things that are >supposed to show). > >My "workaround" at the moment is to have <body text="FFFFFF"> which >makes it white like the background, but there's gotta be a reason for >this, right? :-) Any ideas? You only require that line if you're running PHP as CGI. If it's showing, you're not running as CGI, you're probably running as an Apache module, in which case you should remove that line. -- Andy Hassall / <andy@andyh.co.uk> / <http://www.andyh.co.uk> <http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool |
|
|||
|
Nope, doesn't work if you remove the path... that was one of the first
things I tried... I wish it were a server I was admin on, I'm putting this stuff through a cgi-bin on a university's server to run, and Lord knows what they have set up. |
|
|||
|
I noticed that Message-ID:
<1108771828.162780.255080@f14g2000cwb.googlegroups .com> from kerri.cahoy@gmail.com contained the following: >Nope, doesn't work if you remove the path... that was one of the first >things I tried... I wish it were a server I was admin on, I'm putting >this stuff through a cgi-bin on a university's server to run, and Lord >knows what they have set up. I never used PHP in this mode but I was just wondering if it still works if you comment it out? -- Geoff Berrow (put thecat out to email) It's only Usenet, no one dies. My opinions, not the committee's, mine. Simple RFDs http://www.ckdog.co.uk/rfdmaker/ |
|
|||
|
<kerri.cahoy@gmail.com> wrote in message news:1108771828.162780.255080@f14g2000cwb.googlegr oups.com... > Nope, doesn't work if you remove the path... that was one of the first > things I tried... I wish it were a server I was admin on, I'm putting > this stuff through a cgi-bin on a university's server to run, and Lord > knows what they have set up. > Try putting a ob_end_clean(); at the beginning of the script. |
|
|||
|
.oO(Andy Hassall)
>On 18 Feb 2005 10:49:34 -0800, kerri.cahoy@gmail.com wrote: > >>The issue is that whenever I call/execute my php scripts, which all >>require the path as the first line, i.e., #!/usr/pubsw/bin/php ... >>[...] > >You only require that line if you're running PHP as CGI. Depends on server configuration. On my systems it's not needed. Micha |