简体   繁体   English

无法通过 MAMP 访问 index.html 页面

[英]can not access index.html page through MAMP

I am studying fundamentals of PHP programming and during my first program I encountered some problems with MAMP.I created a "first" directoory with index.html file inside the htdoccs directory.But i can not access this file through MAMP localhost.What is the problem?我正在研究 PHP 编程的基础知识,在我的第一个程序中,我遇到了 MAMP 的一些问题。我在 htdoccs 目录中创建了一个带有 index.html 文件的“第一个”目录。但是我无法通过 MAMP localhost 访问这个文件。什么是问题?

enter image description here在此处输入图像描述

enter image description here在此处输入图像描述

The first folder has an uppercase F, First have you tried renaming it to first or using First in the browser?第一个文件夹有一个大写的F, First你试过把它重命名为first还是在浏览器中使用First

For MAMP, a web page starts from htdocs,对于 MAMP,web 页面从 htdocs开始

So instead of所以而不是

http://localhost/MAMP/first/index.html

please visit请拜访

http://localhost/First/index.html

For windows environment, letter case may not be the problem, so First, first, FIRst are all "ok", but if you migrate the code to a unix/linux platform, letter case must matches.对于 windows 环境,字母大小写可能不是问题,所以首先,首先,FIRst 都“ok”,但是如果将代码迁移到 unix/linux 平台,字母大小写必须匹配。 Hence as a good practice please make sure you use the letter case in links properly因此,作为一种良好做法,请确保正确使用链接中的字母大小写

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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