【问题标题】:How to let my laragon server to start using http://localhost instead of file:///如何让我的 laragon 服务器开始使用 http://localhost 而不是 file:///
【发布时间】:2016-08-02 11:17:49
【问题描述】:

我刚刚下载了 largon 作为我的 php 项目的服务器。现在我发现很难让我的文件采用 localhost:/test.php 而不是 file://test.php 的形式。当它使用 file:// 时,我的所有代码在浏览器中运行时都不会执行,而是在浏览器的编辑器中显示。

有人可以指导我如何将文件://切换到本地主机:/

谢谢。

【问题讨论】:

  • 好吧,只要在浏览器中输入 localhost://?
  • 我做了,它显示了 laragon 欢迎页面,但是在为新项目创建新文件夹时出现了问题。
  • 那么您必须将该文件夹添加到 url(取决于虚拟服务器的设置方式)。喜欢localhost://myproject/
  • 做到了。显示禁止访问。

标签: php laravel server laragon


【解决方案1】:

@Adetona77: 如果您的 www 文件夹包含文件夹名称 adetona 和文件名 test.php 像这样:

www 
---test.php 
---adetona

使用 Laragon,您可以通过以下方式访问 test.php
http://localhost/test.php

对于文件夹 adetona,您有 2 个选项:

  1. 通过 localhost 访问它: http://localhost/adetona

  2. 通过漂亮的 url 访问: http://adetona.dev

选项2是Laragon的强大功能

【讨论】:

    猜你喜欢
    • 2014-09-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-04-14
    相关资源
    最近更新 更多