更新时间:2023-02-22 21:51:18
如果我正确地收到了您的问题,我认为在XAMPP中访问php文件时也会遇到相同的问题.我已经在网上搜索了几个小时,并在Google和Google上找到了答案,直到找到简单的解决方案为止.
If I got your question correctly, I think I had the same problem accessing a php file in XAMPP. I have been online for several hours searching forums and Google for the answer, not until I found the simple solution.
我以c驱动器上的文件(例如C:\xamp\htdocs\data.php
或file:///c:/xamp/htdocs/data.php
)而不是网页(即//localhost/data.php
)的形式访问PHP文件.
I was accessing the PHP file as a file on c drive (eg. C:\xamp\htdocs\data.php
or file:///c:/xamp/htdocs/data.php
) instead of as a webpage (ie //localhost/data.php
).
我希望这对您也有帮助.
I hope this will be helpful to you as well.