Im trying to call to a python file from php using shell_exec command. But shell_exec doesen't give any out put.
I run the python script on terminal and it gave me the correct output
python3 var/www/html/thilina/assets/documents/threadsearch.py keyword,equipment_types/2
This how i call the python script in my controller
$key = $this->input->post('search');//from ajax
$fnum = $this->input->post('sub');//from ajax
$sym = $key.",".$fnum;//search key + 2
$chk = FCPATH."/assets/documents/threadsearch.py";
$chk = str_replace('\\', '/', $chk);
$output = shell_exec("python3 $chk $sym");//get the output from python script