简体   繁体   English

在Mac上找不到XAMPP对象

[英]XAMPP object not found on mac

I just installed Xampp on my mac. 我刚刚在Mac上安装了Xampp。 I can easily reach my phpadmin page with entring the address http://192.168.64.2/phpmyadmin/ . 输入地址http://192.168.64.2/phpmyadmin/即可轻松进入我的phpadmin页面。 But I cannot run my php file that I've already created and save it in htdocs in lampp as the following addres : http://192.168.64.2/opt/lampp/htdocs/myapp/First.php 但是我无法运行已经创建的php文件,并将其保存为lampp的htdocs中的以下地址: http : //192.168.64.2/opt/lampp/htdocs/myapp/First.php

that gives me the error object not found. 这给了我找不到错误对象。

since I'm new in php and using Xampp, I highly appreciate if anyone can help me to fix this problem. 由于我是php的新手,并且使用Xampp,因此,如果有人可以帮助我解决此问题,我将深表感谢。 Thank you so much 非常感谢

"htdocs" is normally the DOCUMENT_ROOT (that localhost refers to), so you would not normally specify this in the URL. “ htdocs”通常是DOCUMENT_ROOT(localhost所指),因此通常不会在URL中指定它。

That said, I would expect the URL to be http://localhost/file_name.php . 就是说,我希望URL为http://localhost/file_name.php To be honest, if you are having to specify "htdocs" in the URL then the DocumentRoot (in your server config) is probably set incorrectly. 老实说,如果您必须在URL中指定“ htdocs”,则DocumentRoot(在服务器配置中)可能设置不正确。

Hope this can give you some insightful. 希望这可以给您一些有见地的信息。

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

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