how's this?
#!/usr/bin/php
?php
class trimshebang {
function filter($in, $out, $consumed, $closing)
{
while ($bucket = stream_bucket_make_writeable($in)) {
$bucket-data = ltrim($bucket-data,#!/usr/bin/php\n);
$consumed += $bucket-datalen;
stream_bucket_append($out,
Nathan Rixham wrote:
how's this?
#!/usr/bin/php
?php
class trimshebang {
function filter($in, $out, $consumed, $closing)
{
while ($bucket = stream_bucket_make_writeable($in)) {
$bucket-data = ltrim($bucket-data,#!/usr/bin/php\n);
$consumed += $bucket-datalen;
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
?php
class trimshebang {
function filter($in, $out, $consumed, $closing)
{
while ($bucket =
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
Nathan Rixham schreef:
how's this?
#!/usr/bin/php
?php
class trimshebang {
function filter($in, $out, $consumed, $closing)
{
while ($bucket = stream_bucket_make_writeable($in)) {
$bucket-data = ltrim($bucket-data,#!/usr/bin/php\n);
$consumed += $bucket-datalen;
5 matches
Mail list logo