PHPStorm本地主机和通常的XAMPP本地主机有什么区别? [英] What is the difference between PHPStorm localhost, and the usual XAMPP localhost?

查看:121
本文介绍了PHPStorm本地主机和通常的XAMPP本地主机有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将PHPStorm与XAMPP一起使用.

I am using PHPStorm with XAMPP.

两者之间有什么区别

http://localhost:63342/PhpstormProjects/project.php

还有

http://localhost/PhpstormProjects/project.php

似乎这两个是不同的本地主机.第一个仅在打开PHPStorm时有效.

It seems like this two are different localhosts. The first one works only with PHPStorm opened.

现在我对第一个有问题,它不断抛出500 Internal Server错误,我不知道为什么.但是第二个URL中的Localhost没有.

Now I have a problem with the first one, it keeps throwing an 500 Internal Server error and I can not figure out why. But the Localhost from the second url does not.

那么有没有办法告诉PHPStorm,在没有63342的情况下随机使用Localhost?

So is there a way to tell PHPStorm, to randomly use the Localhost without the 63342?

推荐答案

第一个是PhpStorm自己的简单内置Web服务器,当您选择在浏览器中打开文件时(例如从IDE中打开文件时),IDE会默认使用它.不要指定您自己的网址.

The first one is PhpStorm's own simple built-in web server which IDE uses by default when you choose to open file in browser and alike from IDE and when you do not specify your own URL.

要使用它,您需要定义本地PHP解释器(因为它需要实际的PHP来处理您的.php文件).

In order to use it you need to have local PHP Interpreter defined (as it needs actual PHP to process your .php files).

通常,URL为:localhost:63342/YOUR_PROJECT_NAME/path/to/file.php.

您可以阅读有关它的更多信息这里.

You can read a bit more about it here.

第二个是您的实际XAMPP,它使用默认的& http协议端口80的标准.

The second one is your actual XAMPP -- it uses default & standard for http protocol port 80.

这篇关于PHPStorm本地主机和通常的XAMPP本地主机有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆