my environment nginx,php,mysql;
I built a test.php with the following contents:
php
file_put_contents ("/ log.txt","aaaa");
then execute the run command:
/ usr/local/nginx/test/test.php
error message is as follows:
/ usr/local/nginx/html/test/test.php: line 1:? php: No such file or directory
/ usr/local/nginx/html/test/test.php: line 2: syntax error near unexpected token `/ log.txt","aaaa""
/ usr/local/nginx/html/test/test.php: line 2: `file_put_contents ("/ log.txt","aaaa");"
modify test.php, directly echo 1;
can output 1, change test.php to for loop, the error message is the same as above, find out the specific reason, is not linux running php file does not run in this way or how?