升级 Xampp 以运行 php 7 [英] Upgrading Xampp to run php 7

查看:27
本文介绍了升级 Xampp 以运行 php 7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

阅读了几个关于如何将 xampp 升级到较新版本的 php 的问题后.我开始将我的升级到版本 7,因为我想学习

After Reading a couple of question on how to upgrade xampp to newer versions of php. I started upgrading mine to version 7 as I wanted to learn

严格类型提示

我从 officialsite 下载了 php 7.我将这个下载文件夹的内容复制到了xampp.但它不起作用.我将 php.ini-development 重命名为 php.ini.有没有更好的方法来做到这一点,因为它不起作用.

I downloaded php 7 from officialsite.I copied the content of this downloaded folder to php folder of xampp.but it is not working.I renamed php.ini-development to php.ini.Is there any better way to do this because it is not working.

请帮忙.

推荐答案

我认为@camelCase 不错,但您也可以考虑尝试这种方法.它可能适合您的需要.

I consider @camelCase good, but you can also consider trying this method. It may suite your need.

在 XAMPP 中升级到 PHP7在继续之前,我建议备份您的 XAMPP 配置.完成备份后,下面是在 XAMPP 中使用 PHP7 的一些步骤

Upgrade to PHP7 in XAMPP Before proceeding further I will recommend to take backup of your XAMPP configuration. After you have made backup below are some steps to use PHP7 with in your XAMPP

  1. 下载 PHP7:从 下载 php7php.net 网站.

如果您的 apache 是线程安全的,则下载 PHP7 的线程安全版本,否则下载 NTS,即非线程安全版本.

If your apache is thread safe then download a thread safe version of PHP7 otherwise download NTS i.e non thread safe version.

  1. 将 PHP 放在 XAMPP 中的适当位置:将 PHP7 放在 XAMPP 中.我通常更喜欢放在/XAMPP/php7 位置,但您可以根据需要放置.将新的 php 版本放入 xampp 没有任何限制.

  1. Place PHP on appropriate place in your XAMPP : Put your PHP7 in your XAMPP. I usually prefer to to put on location /XAMPP/php7 but you can put as per your need. There is no any restriction for putting your new php version in xampp.

在你的 apache 中包含 PHP7:在 XAMPP 中,PHP 是使用 apache 文件路径配置的 [yourxampp/apache/conf/extra/httpd-xampp.conf].请打开文件添加首先更改php7目录中的所有变量路径.

Include PHP7 with your apache : In XAMPP, PHP is configured using apache file path [yourxampp/apache/conf/extra/httpd-xampp.conf]. Please open the file add first change all variable path from php7 directory.

另外不要忘记使用下面的代码添加 php7 模块

Also do not forget to add php7 module using below code

LoadFile yourxampppath/php7/php7ts.dll
LoadFile yourxampppath/php7/libpq.dll
LoadModule php7_module yourxampppath/php7/php7apache2_4.dll

确保为您的 PHP7 更改 PHP ini 目录

Make sure to change PHP ini directory for your PHP7

<IfModule php7_module>
    PHPINIDir "yourxampppath/php7"
</IfModule>

Chechout www.techflirt.com

这篇关于升级 Xampp 以运行 php 7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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