|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[1998-04-22 01:24 UTC] jpronk at linkalarm dot com
I can't seem to get quoted arguments to commands to execute and
return output with the system() or exec() commands.
Eg.
system("script -name \"The Name Is\"",$returncode)
always returns a return a code of 1 and no output. I have tried using
combinations of single and double quotes, ", %20 for the
spaces. But no luck.
Not sure if this is a bug or not, but the call in the unix
shell works just fine, but not using system() in php?
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 13:00:01 2025 UTC |
It works fine for all of the tests I've put it through. If you can provide us with a code snippet that demonstrates the bug (including whatever PHP3 scripts or non-PHP3 scripts are necessary) - please submita new bug report. Here's a simple example that demonstrates that it works fine: ---test.pl--- #!/usr/local/bin/perl -w print "${ARGV[0]}\n"; exit(17); ------------- --test.php3-- <? system("./test.pl \"Hey there\"",$ret); print "$ret\n"; ?> ------------- Result: Hey there 17