简体   繁体   中英

Cannot access the server using XAMPP and PHP

I'm brand new today to using PHP but I can't get anything showing on the page. I've installed XAMPP, started the server, mounted the volume and created a new file, index.php, which I've moved into a new folder called scripts inside htdocs. Based on the articles I've been following this should give me output at localhost/scripts/index.php but it is only giving me the 'requested URL not found on this server' response (I'm just running a basic echo 'hello world' line). Thanks for any help.

Going to just http://localhost shows the 'It works!' message but nothing else.

在此处输入图片说明

Check if there are any processes running on port 80, if you have skype or torrent client please close them and try restarting xampp.

Also check if it running on your IP Address. open command prompt and type ipconfig for windows and ifconfig for mac. once you get your ip address type it in the browser and see if you can find the server running.

Try to save the file with correct extension ie .php just typing .php at the end sometimes doesn't work.

Try to do this, 1. Add double inverted commas "" 2. File Save as Type - All Files 3. add .php at the end of your filename 检查红色引号

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM