Re: [PHP-DEV] Tip of the day: embedding php code in scripts

2002-05-22 Thread Roberto Berto
; > > > -js > > > > - Original Message - > > From: "Stig S. Bakken" <[EMAIL PROTECTED]> > > To: "Preston L. Bannister" <[EMAIL PROTECTED]> > > Cc: "Stig S. Bakken" <[EMAIL PROTECTED]>; <[EMAIL PROTECTE

Re: [PHP-DEV] Tip of the day: embedding php code in scripts

2002-05-22 Thread Jonathan Sharp
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, May 20, 2002 4:38 PM Subject: RE: [PHP-DEV] Tip of the day: embedding php code in scripts > On Mon, 2002-05-20 at 19:21, Preston L. Bannister wrote: > > From: Stig S. Bakken [mailto:[EMAIL PROTECTED]] >

RE: [PHP-DEV] Tip of the day: embedding php code in scripts

2002-05-20 Thread Stig S. Bakken
Without output buffering, the script would output: exec $0 $@ Hello World! The -q option could be added to make it work with cgi as well as cli, but the point of the output buffering is to kill the line of shell script that PHP would treat as plain text to display. - Stig On Mon, 2002-05-20 a

RE: [PHP-DEV] Tip of the day: embedding php code in scripts

2002-05-20 Thread Stig S. Bakken
On Mon, 2002-05-20 at 19:21, Preston L. Bannister wrote: > From: Stig S. Bakken [mailto:[EMAIL PROTECTED]] > > Did anyone come up with this one before or do I have a "first post"? :-) > > > > #!/bin/sh > > exec php -d output_buffering=1 $0 $@ > > > ob_end_clean(); > > print "Hello World!\n"; > >

RE: [PHP-DEV] Tip of the day: embedding php code in scripts

2002-05-20 Thread Dan Hardiker
Im unsure of the need for output_buffering... if its to kill the headers, then "php -q" will suppress those. In any case, I believe the Stig is asking if anyone has thought of embedding php scripts inside typical /bin/sh shell scripts. EG: #!/bin/sh //- script stuff here -\\ exec /usr/local/bin/ph

RE: [PHP-DEV] Tip of the day: embedding php code in scripts

2002-05-20 Thread Preston L. Bannister
From: Stig S. Bakken [mailto:[EMAIL PROTECTED]] > Did anyone come up with this one before or do I have a "first post"? :-) > > #!/bin/sh > exec php -d output_buffering=1 $0 $@ > ob_end_clean(); > print "Hello World!\n"; > ?> Or the shorter (and faster) version: #!/usr/local/bin/php -d output_b

[PHP-DEV] Tip of the day: embedding php code in scripts

2002-05-20 Thread Stig S. Bakken
Did anyone come up with this one before or do I have a "first post"? :-) #!/bin/sh exec php -d output_buffering=1 $0 $@ - Stig -- PHP Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php