From 6a3414d71875d2d7ac702191e0ee963d9d78bd9c Mon Sep 17 00:00:00 2001 From: edbrz9 Date: Thu, 29 Dec 2022 13:11:55 +0100 Subject: [PATCH] ... --- proj/y2t/handler.php | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/proj/y2t/handler.php b/proj/y2t/handler.php index 4b7de57..55fb5cc 100644 --- a/proj/y2t/handler.php +++ b/proj/y2t/handler.php @@ -21,16 +21,11 @@ echo $lang; echo nl2br("\n"); - // Open a pipe to the python script - $handle = popen("python3 y2t.py $url $lang", "r"); - while (!feof($handle)) { - $output = fread($handle, 1024); - echo $output; - } - $exitCode = pclose($handle); - + $output = exec("python3 y2t.py $ulr $lang", $output, $return_code); + wait($return_code); + echo $output; echo nl2br("\n"); - echo "end of php"; + echo "check" ?>