Hướng dẫn shell_exec alternative php
I am using a PHP script on a local machine connected to an offline server. That server has a webpage on it that processes some homebrewed scripts. This all works fine. However, my setup currently looks something like this
This is fine and works. However, each of these scripts have a ton of output. At seemingly random, arbitrary points in my code, the webpage refreshes and shows that output on a white background. I'm fine with this, except for the random, arbitrary points. Is it possible to get this to do that in real time? I'm not even sure what to Google for this issue as nothing I've tried has seemed related. PHP supports one execution operator: backticks (``). Note that these are not single-quotes! PHP will attempt to execute the contents of the backticks as a shell command; the output will be returned (i.e., it won't simply be dumped to output; it can be assigned to a variable). Use of the backtick operator is identical to shell_exec().
robert ¶ 16 years ago
ohcc at 163 dot com ¶ 5 years ago
(PHP 4, PHP 5, PHP 7, PHP 8) shell_exec — Execute command via shell and return the complete output as a string Descriptionshell_exec(string
Parameterscommand The command that will be executed. Return Values A string containing the output from the executed command,
Errors/Exceptions An ExamplesExample #1 A shell_exec() example
See Also
trev at dedicate.co.uk ¶ 10 years ago
smcbride at msn dot com ¶ 1 year ago
alexandre dot schmidt at gmail dot com ¶ 6 years ago
Rgemini ¶ 13 years ago
eric dot peyremorte at iut-valence dot fr ¶ 14 years ago
tonysb at gmx dot net ¶ 20 years ago
kamermans at teratechnologies dot net ¶ 14 years ago
pedroxam at gmail dot com ¶ 3 years ago
joelhy ¶ 13 years ago
jack dot harris-7ot2j4ip at yopmail dot Com ¶ 8 years ago
Numabyte ¶ 1 year ago
saivert at saivert dot com ¶ 14 years ago
GetVolumeLabel("c");?> Anonymous ¶ 17 years ago
codeslinger at compsalot dot com ¶ 12 years ago
= shell_exec("php -s $File"); //this fails
RoBorg ¶ 14 years ago
jessop 18 years ago
wally at soggysoftware dot co dot uk ¶ 10 years ago
rustleb at hotmail dot com ¶ 16 years ago
is_resource($proc)) return 255;fclose($pipes[0]); //Don't really want to give any input$exit = proc_close($proc); Which shell? ¶ 5 months ago
martin at intelli-gens dot com ¶ 12 years ago
dburles@NOSPAMgmailDOTcom ¶ 13 years ago
gabekon at gmail dot com ¶ 14 years ago
= 'export LD_LIBRARY_PATH="' . $path_to_library_dir .'"; ' . $path_to_binary; mcbeth at broggs dot org ¶ 19 years ago
Ashraf Kaabi ¶ 16 years ago
Martin Rampersad ¶ 18 years ago
concept at conceptonline dot hu ¶ 17 years ago
Paul Cook ¶ 16 years ago
phillipberry at NOSPAM dot blisswebhosting dot com ¶ 17 years ago
php [AT] jsomers [DOT] be ¶ 17 years ago
KillAllProcesses();?> smithnigelw at gmail dot com ¶ 4 years ago
ruan at nospam dot tillcor dot com ¶ 16 years ago
rigsbr at yahoo dot com dot br ¶ 16 years ago
James McCormack ¶ 18 years ago
ricky at rocker dot com ¶ 3 years ago
|