PHP 5.2 和 5.3 一起

发布于 2024-09-24 21:36:26 字数 86 浏览 1 评论 0原文

我有带有 PHP 5.2 的 XAMPP,但我的新项目需要 PHP 5.3 如何将 PHP 5.2 和 5.3 结合在一起?

我有winXP。

I have XAMPP with PHP 5.2, but my new projects need PHP 5.3
How to have PHP 5.2 and 5.3 together?

I have winXP.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

若沐 2024-10-01 21:36:26

您可以执行以下操作之一:

  • 确保您的旧应用程序可以在 5.3 上运行,但不使用 5.3 的特定功能。这可能是
    最好的路线,因为它会收紧你
    代码,它将运行在更多
    平台,尤其是未来
    当更多的生产环境
    仅使用 5.3。

    如果这仅用于开发目的,您还可以考虑:

  • 多次安装
    XAMPP 并在它们之间切换
    必要时通过简单文件夹
    重命名(有点乏味)

  • php-switch(非常乏味)

  • 设置两个 apache 服务器 在同一台计算机上运行不同的 PHP 版本

You can do one of the following:

  • Ensure your older apps can run on 5.3 while not using 5.3 specific features. This is probably the
    best route as it will tighten your
    code and it will run on more
    platforms, especially in the future
    when more production environments
    use 5.3 only.

    If this is for development purposes only you can also consider:

  • multiple installations
    of XAMPP
    and switch between them
    when necessary via simple folder
    rename (somewhat tedious)

  • php-switch (very tedious)

  • setup two apache servers on the same machine running different PHP versions

转身以后 2024-10-01 21:36:26

您有两种选择:在不同端口上运行两个服务器,或者使用 CGI。

您可以在此处获取带有 PHP 5.3.1 的 XAMPP:http://www.apachefriends。 org/en/xampp-windows.html#641
编辑 \xampp\apache\conf\httpd.conf,并将 Listen 更改为 Listen 8080 例如。
然后运行 ​​\xampp\apache_start.bat 启动该服务器实例。 (可选)将 DocumentRoot 更改为您的项目目录。

You've two choices: run two servers on a different port, or use CGI.

You can get XAMPP with PHP 5.3.1 here: http://www.apachefriends.org/en/xampp-windows.html#641
Edit \xampp\apache\conf\httpd.conf, and change Listen to Listen 8080 for example.
Then run \xampp\apache_start.bat to start that server instance. Optionally, change DocumentRoot to your project directory.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文