Settings | Sign in | Sign up

There are currently 7 posts.

【祝贺】我已成功在Windows 7上安装了PHP7的正式版!

Floor 1 巨大八爪鱼 12/5/15 10:59
操作系统:Windows 7 Ultimate 64位
Web服务器:Apache 2.4
下载的php压缩包名称:php-7.0.0-Win32-VC14-x64.zip
phpinfo截图:
Floor 2 巨大八爪鱼 12/5/15 11:01
解压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
Floor 3 巨大八爪鱼 12/5/15 11:02
httpd.conf中调用php的代码:
LoadModule php7_module "C:/Web/php/php7apache2_4.dll"
AddType application/x-httpd-php .php
PHPIniDir "C:/Web/php"

只需在第一行把原有的两个php5改成php7就行了
Floor 4 巨大八爪鱼 12/5/15 11:02

Apache2.4服务属性
Floor 5 巨大八爪鱼 12/5/15 11:04
php7的安装目录:
Floor 6 巨大八爪鱼 12/5/15 11:09
在Windows上启用php扩展:



Floor 7 巨大八爪鱼 12/5/15 11:17
写一个程序测试:
<?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');
?>

输出:

Content converter:

Reply the post
Content:
User: You are currently anonymous.
Captcha:
Unclear? Try another one.
©2010-2025 Purasbar Ver3.0 [Mobile] [Desktop]
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported license.