Greg Donald schreef:
On 2/28/08, Casey <[EMAIL PROTECTED]> wrote:
#!/usr/bin/php
Or the entirely more portable version:
#!/usr/bin/env php
thanks for the tip :-)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On 2/28/08, Casey <[EMAIL PROTECTED]> wrote:
> #!/usr/bin/php
Or the entirely more portable version:
#!/usr/bin/env php
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Casey wrote:
On Thu, Feb 28, 2008 at 3:39 AM, Jochem Maas <[EMAIL PROTECTED]> wrote:
hi there,
I can't seem to manage to buffer output (of an included file) in a CLI script,
the following does not work:
// buffer output so we can avoid the shebang line being
output (an
On Thu, Feb 28, 2008 at 3:39 AM, Jochem Maas <[EMAIL PROTECTED]> wrote:
> hi there,
>
> I can't seem to manage to buffer output (of an included file) in a CLI
> script,
> the following does not work:
>
>
> // buffer output so we can avoid the shebang line being
> output (an
Nathan Rixham schreef:
how's this?
#!/usr/bin/php
data = ltrim($bucket->data,"#!/usr/bin/php\n");
$consumed += $bucket->datalen;
stream_bucket_append($out, $bucket);
}
return PSFS_PASS_ON;
}
}
stream_filter_register("trim.shebang", "trimshebang");
include "php://filter/rea
Jochem Maas schreef:
...
indeed ... I tested it and it works on my server too. my code is no
different
to yours with regard to the context of the problem. so what's going on.
I think (I know) I forgot to mention one tiny little detail.
the whole 'include' code occurs in a script that forks
Aschwin Wesselius wrote:
Me thinks that when shebang doesn't fit /usr/bin/php (which happens
sometimes) you're doomed.
[snip]
good point.. modified to use BINDIR:
#!/usr/bin/php
data = ltrim($bucket->data,"#!".PHP_BINDIR."/php\n");
$consumed += $bucket->datalen;
stream_bucket_
Nathan Rixham wrote:
how's this?
#!/usr/bin/php
data = ltrim($bucket->data,"#!/usr/bin/php\n");
$consumed += $bucket->datalen;
stream_bucket_append($out, $bucket);
}
return PSFS_PASS_ON;
}
}
stream_filter_register("trim.shebang", "trimshebang");
include "php://filter/read=
how's this?
#!/usr/bin/php
data = ltrim($bucket->data,"#!/usr/bin/php\n");
$consumed += $bucket->datalen;
stream_bucket_append($out, $bucket);
}
return PSFS_PASS_ON;
}
}
stream_filter_register("trim.shebang", "trimshebang");
include "php://filter/read=trim.shebang/resource=
Stuart Dallas schreef:
On 28 Feb 2008, at 12:29, Jochem Maas wrote:
Stuart Dallas schreef:
On 28 Feb 2008, at 11:52, Stut wrote:
On 28 Feb 2008, at 11:39, Jochem Maas wrote:
I can't seem to manage to buffer output (of an included file) in a
CLI script,
the following does not work:
Nathan Rixham schreef:
Jochem Maas wrote:
...
-Stut
bit of false logic here but have you tried:
eval(ltrim(file_get_contents($script),$shebang));
haven't tried it, did consider it. I hate eval() :-)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://ww
Jochem Maas wrote:
I mean that the shebang line at the top of the included file is output
to stdout even when I turn on output buffering on prior to including
the file.
nothing else is output but that's because the script doesn't generate
any further
output - it logs everything instead - and
On 28 Feb 2008, at 12:29, Jochem Maas wrote:
Stuart Dallas schreef:
On 28 Feb 2008, at 11:52, Stut wrote:
On 28 Feb 2008, at 11:39, Jochem Maas wrote:
I can't seem to manage to buffer output (of an included file) in
a CLI script,
the following does not work:
// buffer outp
Jochem Maas wrote:
Stut schreef:
On 28 Feb 2008, at 11:39, Jochem Maas wrote:
I can't seem to manage to buffer output (of an included file) in a
CLI script,
the following does not work:
// buffer output so we can avoid the shebang line
being output (and strip it from the
Stuart Dallas schreef:
On 28 Feb 2008, at 11:52, Stut wrote:
On 28 Feb 2008, at 11:39, Jochem Maas wrote:
I can't seem to manage to buffer output (of an included file) in a
CLI script,
the following does not work:
// buffer output so we can avoid the shebang line
being out
Stut schreef:
On 28 Feb 2008, at 11:39, Jochem Maas wrote:
I can't seem to manage to buffer output (of an included file) in a CLI
script,
the following does not work:
// buffer output so we can avoid the shebang line
being output (and strip it from the output we log)
Andrés Robinet schreef:
-Original Message-
From: Jochem Maas [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 28, 2008 6:39 AM
To: [php] PHP General List
Subject: [PHP] output buffering in CLI script.
hi there,
I can't seem to manage to buffer output (of an included file) in a CLI
scr
On 28 Feb 2008, at 11:52, Stut wrote:
On 28 Feb 2008, at 11:39, Jochem Maas wrote:
I can't seem to manage to buffer output (of an included file) in a
CLI script,
the following does not work:
// buffer output so we can avoid the shebang line
being output (and strip it from
On 28 Feb 2008, at 11:39, Jochem Maas wrote:
I can't seem to manage to buffer output (of an included file) in a
CLI script,
the following does not work:
// buffer output so we can avoid the shebang line
being output (and strip it from the output we log)
> -Original Message-
> From: Jochem Maas [mailto:[EMAIL PROTECTED]
> Sent: Thursday, February 28, 2008 6:39 AM
> To: [php] PHP General List
> Subject: [PHP] output buffering in CLI script.
>
> hi there,
>
> I can't seem to manage to buffer output (of an included file) in a CLI
> script,
>
20 matches
Mail list logo