est-in
Новичок
Можно еще что-то вроде этого...
Насколько это корректно я не знаю.
Насколько это корректно я не знаю.
PHP:
$descriptorspec = array(
0 => array("pipe", "r"), // stdin is a pipe that the child will read from
1 => array("file", "php://stdout", "w"), // stdout is a pipe that the child will write
2 => array("file", "/tmp/error-output.txt", "a") // stderr is a file
);
$process = proc_open('convert preview.jpg -coalesce jpg:-', $descriptorspec, $pipes);
if (is_resource($process)) {
$return_value = proc_close($process);
echo "command returned $return_value\n";
}