PHP.nl

passthru

passthru

Execute an external program and display raw output

 **passthru** string $command int $result_code

The function is similar to the function in that it executes a . This function should be used in place of or when the output from the Unix command is binary data which needs to be passed directly back to the browser. A common use for this is to execute something like the pbmplus utilities that can output an image stream directly. By setting the Content-type to and then calling a pbmplus program to output a gif, you can create PHP scripts that output images directly. passthru``exec``command``exec``system``image/gif

commandThe command that will be executed.

result_code If the argument is present, the return status of the Unix command will be placed here. result_code

return.nullorfalse

Will emit an if is unable to execute the . E_WARNING``passthru``command

Throws a if is empty or contains null bytes. ValueError``command

exec``system``popen``escapeshellcmdbacktick operator