Home > Article > Backend Development > Executing php exec system shell_exec has no results? Done in one article!
This article will introduce to you the problem that php exec system shell_exec cannot be executed. The main content is to explain the method of executing php exec() system() shell_exec() without results and the result is NULLD. I hope it will be helpful to friends in need~
php exec() system() shell_exec() cannot be executed, there is no result, the result is NULLD, solution
8dd35a9bb6694d18fe2e705a52c40454' var_dump($arr);
After the browser is accessed, the printed result is: NULL
It means that the server has not turned on PHP and used exec(); [Recommended learning: PHP video Tutorial】
Solution:
6783dc79d460790f46c82eb82ede8dfb' var_dump($arr);
Display: root
$ chmod 777 index.php
View the user and permissions of index.php:
$ ll
Result:
-rwxrwxrwx 1 root root 1595 Sep 20 10:18 index.php
$ cd /usr/local/php/etc $ vim php.ini
Remove exec, system, and exec_shell and use whichever one you use;
$ /etc/init.d/php-fpm restartThen test, the browser accesses the server and the result is: Most of it is because php.ini disables the exec function and the execution permission of the file.
The above is the detailed content of Executing php exec system shell_exec has no results? Done in one article!. For more information, please follow other related articles on the PHP Chinese website!