【问题标题】:How to create multiple laravel projects in wamp 2.4 (Windows 7 32 bit)如何在 wamp 2.4(Windows 7 32 位)中创建多个 laravel 项目
【发布时间】:2014-09-16 23:20:02
【问题描述】:

Laravel 和 PHP 编程新手。我已经在我的 wamp 上成功安装了 Laravel 4 框架。现在,我想将现有的 Laravel 项目(使用 Apache 配置并使用 VC11 编译)导入我自己的本地 wamp 2.4(PHP 5.4.16)。所以,我的问题是

1. Is it possible for wamp to host 2 laravel projects on the same machine?
2. If yes to (1), then what would I need to configure this or is there a guide/tutorial on this?
3. If no to (1), would I need to reconfigure the original settings of the existing laravel project for it to work on my wamp?

【问题讨论】:

    标签: php laravel windows-7 wamp


    【解决方案1】:

    简单的答案是:Wamp 在 c:\wamp\www\ 中有一个 www 目录,因此您可以简单地创建两个项目,例如 c:\wamp\www\project1 和 c:\wamp\www\project2 和使用 Composer 导入项目。

    【讨论】:

    • 感谢 Composer 导入提示!我只是将整个项目复制粘贴到我的 www 文件夹中。到目前为止,我可以看到 index.php 文件显示。我认为它现在很好,但它是一个空的 laravel 框架,还没有构建任何东西。不知道以后是否会因为不使用 Composer 导入项目而遇到麻烦。
    【解决方案2】:

    不是使用 WAMP 的解决方案,因此如果这对您的设置至关重要,那么此答案将无济于事,但另一种选择是使用 vagrant。这使您可以运行一个与您的部署环境非常相似的开发环境,这将使您在部署时不必担心为什么事情不正常并支持多个站点。

    我相信 laravel 有自己的官方,易于使用的 vagrant 文件,称为 homestead

    【讨论】:

    • Wamp 已经安装在我的机器上,所以我只是使用它而不是将其配置到开发中。感谢关于宅基地的提示。我会研究它,看看我将来如何使用它进行部署。
    猜你喜欢
    • 1970-01-01
    • 2015-06-13
    • 2015-01-12
    • 2017-05-15
    • 1970-01-01
    • 2012-06-14
    • 1970-01-01
    • 2011-12-21
    • 1970-01-01
    相关资源
    最近更新 更多