Use shell_exec |
Hi
I can use shell_exec without codeigniter with below code test.php in root : PHP Code: file_put_contents('temp.txt',json_encode($argv)); PHP Code: shell_exec("php test.php 'names' > /dev/null 2>/dev/null &")); But cannot use for codeigniter Example : localhost/users/remove Try to use PHP Code: shell_exec("php index.php/users/remove 'names' > /dev/null 2>/dev/null &")); Thanks
(05-22-2018, 09:05 AM)php_rocs Wrote: @omid_student return null result Is it right code?
Read below, look for all the problems users were having with path problems.
PHP NET - shell_exec You may need to set your path up for it to work. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(05-23-2018, 03:39 AM)InsiteFX Wrote: Read below, look for all the problems users were having with path problems. Thanks but my problem is path
In that read it shows you how to see what path shell_exec is pointing to
and then how to change it. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(05-23-2018, 04:35 AM)omid_student Wrote:(05-23-2018, 03:39 AM)InsiteFX Wrote: Read below, look for all the problems users were having with path problems. change php to /usr/bin/php
(05-23-2018, 10:35 AM)Paradinight Wrote:Thank you(05-23-2018, 04:35 AM)omid_student Wrote:(05-23-2018, 03:39 AM)InsiteFX Wrote: Read below, look for all the problems users were having with path problems. It is working now |
Welcome Guest, Not a member yet? Register Sign In |