Web服务器:Apache 2.4
下载的php压缩包名称:php-7.0.0-Win32-VC14-x64.zip
phpinfo截图:

目前共有7篇帖子。
![]() |
操作系统:Windows 7 Ultimate 64位
Web服务器:Apache 2.4 下载的php压缩包名称:php-7.0.0-Win32-VC14-x64.zip phpinfo截图: ![]() |
![]() |
解压PHP压缩包后,还需安装Visual Studio 2015运行库才行,请参阅:
http://stackoverflow.com/questions/30811668/php7-missing-vcruntime140-dll Visual C++ Redistributable for Visual Studio 2015 下载地址: https://www.microsoft.com/en-us/download/details.aspx?id=48145 |
![]() |
httpd.conf中调用php的代码:
LoadModule php7_module "C:/Web/php/php7apache2_4.dll" AddType application/x-httpd-php .php PHPIniDir "C:/Web/php" 只需在第一行把原有的两个php5改成php7就行了 |
![]() |
![]() Apache2.4服务属性 |
![]() |
php7的安装目录:
![]() |
![]() |
在Windows上启用php扩展:
![]() ![]() |
![]() |
写一个程序测试:
<?php function mul10(int $a):int { return $a * 10; } function putstr(string $str) { echo "$str<br>\n"; } $b = 46; echo mul10($b); putstr(''); putstr('hahaha'); ?> 输出: ![]() |