Hi everybody. I am working on a script that needs to be run from the command line.
I want the script not to ouput html headers, so i am using the -q option.
I also want to output some to the command line window.
Because I am using the -q parameter, nothing is going to be output from echo statements.
Any help will be much appreciated.
comman line php
Moderator: General Moderators
I can't find an option -q at http://www.php.net/manual/en/features.commandline.php
And I can't find a difference in the output ofandboth times it's cli without any http headers.
And I can't find a difference in the output of
Code: Select all
php -q -r "echo php_sapi_name();"Code: Select all
php -r "echo php_sapi_name();"Have you tried it? I've got old scripts with the -q & I can output using echo() just fine.
Have you tried running PHP without the -q flag? I don't want to split hairs, but you did say 'would get' rather than 'did get'
Have you tried running PHP without the -q flag? I don't want to split hairs, but you did say 'would get' rather than 'did get'
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
- Ollie Saunders
- DevNet Master
- Posts: 3179
- Joined: Tue May 24, 2005 6:01 pm
- Location: UK