The PHP program runs normally in the root directory, but a 500 error occurs in the subdirectory.
汤兆胜***
汤兆胜*** 2022-02-06 12:30:39
0
3
1193

The PHP program in the root directory of my website can run normally, but in the subdirectory (English version directory), a 500 error occurs whenever the PHP program is run.

I specially made one

<?PHP

echo "This is a PHP test";

?>

Test this sentence and put it in the root directory. It runs normally. If you put it in a subdirectory, the same 500 error occurs, indicating that it is not a problem with the PHP code, but a problem with where it is set.

Please give me some advice, I am a PHP newbie.

汤兆胜***
汤兆胜***

reply all(2)
大瓶可乐

Open the php error report and you can clearly see the cause of the error

逆旅行人a

To see if it is a path problem, take a look at the php error log

  • reply The key is that it has not been touched. It was fine before. It seems that the server automatically upgraded from PHP5.X to PHP7.X and then something went wrong.
    汤兆胜*** author 2022-02-07 10:56:37
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!