`
nasizq
  • 浏览: 43805 次
  • 性别: Icon_minigender_1
  • 来自: 叶柏寿
社区版块
存档分类
最新评论

php now

阅读更多

第一步:下载安装程序
(1) Apache2.2.4版下载,地址:http://httpd.apache.org/download,选择
apache_2.2.4-win32-x86-no_ssl.msi,大约4M多。
(2)PHP5.2.3版下载, 地址:http://www.php.net/downloads.php,选择Windows Binaries下面的PHP5.2.3.zip package,它对应php-5.2.3-Win32.zip文件,大约9M多。

第二步:安装程序
(1) Apache安装
双击安装程序,除了中间有一步需要选择外其余都采用默认安装。例外的那一步有两个选项:一是”for All users, on port80…”,另一个是”only for current user, on port 8080…”,为了测试和开发方便,建议选择后一种,采用8080端口,这样测试方便一些。

(2) PHP安装
选择将php-5.2.3-Win32.zip解压到php-5.2.3-Win32文件下,解压后php-5.2.3-Win32目录下包含有如php.exe和php5apache2_2.dll之类的文件。然后将php-5.2.3-Win32文件名改为php,然后拷贝至C盘根目录下。

第三步:环境配置
(1) 添加PHP环境变量:将” C:\php”添加到系统变量Path,注意与已有的值采用分号分隔。Path系统变量可以通过右击我的电脑->属性->高级->环境变量->系统变量->Path找到。
(2) 修改Apache配置文件:在刚才安装成功的Apache目录C:\Program Files\Apache Software Foundation\Apache2.2\conf下找到httpd.conf,在后面添加如下命令:

LoadModule php5_module "c:/php/php5apache2_2.dll"
AddType application/x-httpd-php .php

第四步:测试成功
(1)编写一个简单的PHP测试网页hello.php,其内容如下:
<html>
<head>
<title>hujiahui</title>
</head>
<body>
<?php echo 'Hello,world!'; ?>
</body>
</html>
将其保存为文件名hello.php,放入C:\Program Files\Apache Software Foundation\Apache2.2\htdocs文件夹下。然后启动Apache,在浏览器地址中输入http://localhost:8080/hello.php,系统打印出”Hello.world!”。
(3) 测试phpinfo函数,phpinfo.php网页内容如下:
<html>
<head>
<title>hujiahui</title>
</head>
<body>
<?php phpinfo(); ?>
</body>
</html>
保存为phpinfo.php,然后输入http://localhost:8080/phpinfo.php测试,可以得到很多关于Apache和PHP的配置信息。

 

解决Apache安装无服务和the requested operation has failed错误

写这个为了以后不再到处上网找答案

Apache安装无服务解决方法:

命令行进入apache目录下的bin ,运行如下指令即可注册服务,如:

D:\Program Files\Apache Software Foundation\Apache2.2\bin> httpd.exe -k install -n apache2.2

 

the requested operation has failed错误解决方法:

在找到httpd.conf文件,修改Listen 80为没被占用的端口

分享到:
评论

相关推荐

    PHP Now Playing-开源

    “正在播放”是一组php脚本,用于显示来自winamp的音频跟踪器插件的正在播放的信息,作为您在论坛等上签名的化身,具有自己选择的格式。

    基于PHP的now framework中文应用框架.zip

    基于PHP的now framework中文应用框架.zip

    基于PHP的now template engine 模板引擎.zip

    基于PHP的now template engine 模板引擎.zip

    基于PHP的now template engine 模板引擎 v1.0.zip

    基于PHP的now template engine 模板引擎 v1.0.zip

    ubuntu 同时装php5.3和5.2

    5.2. Even though D6 core is compatible with PHP 5.3 for quite some time now, a lot of contributes modules still get nasty hiccup when asked to run on the newer version. Therefore developing for both ...

    mac php zip 扩展

    In order to make phpize and php-config find the PHP header files in the location that XCode places them rather than in /usr/include/php -- a read-only location now -- I followed some tips I found ...

    vercel-php:▲Vercel PHP运行时•vercel-php•now-php•:elephant:+λ=:red_heart:

    PHP运行时 用于Vercel平台的 )。 :woman_lifting_weights_2: 它与这些框架和工具一起使用。 在发现更多。 用 :red_heart_selector: 由 ( )• :bird: :smiling_face_with_sunglasses: 入门 让我们想象一下,...

    温泉PHP授权系统开源版

    INSERT INTO sq_admin (ID, username, password, loginip, logintime, qq, lastaccesstime, accesstoken) VALUES (NULL, '温泉', MD5('123456789'), '', unix_timestamp(now()) , '123456789', unix_timestamp(now()...

    多语言的PHP日期库.zip

    具体功能方法:当前时间Carbon::now();一个星期前Carbon::now()-&gt;subWeek();温哥华时间Carbon::now('America/Vancouver');计算年龄Carbon::createFromDate(1984, 8, 28)-&gt;age;判断是否是周末Carbon::now()-&gt;is...

    Tizag's PHP Tutorial

    If you're developing websites and have yet to introduce yourself to PHP, now is the time! Our PHP eBook covers the basics of PHP from installing and running your first script to processing user ...

    PHP.Beyond.the.Web

    PHP is no longer just a great scripting language for websites, it's now a powerful general-purpose programming language. Expand your use of PHP into your back-end systems, server software, data ...

    PHP Cookbook, 2nd Edition

    When it comes to creating dynamic web sites, the open source PHP language is red-hot property: used on more than 20 million web sites today, PHP is now more popular than Microsoft's ASP.NET technology...

    Mastering PHP 7-Packt Publishng(2017).pdf

    The PHP language has been around for quite some time now. What started out as a humble set of scripts, soon turned into a powerful scripting language. The rise of various frameworks and platforms ...

    开发PHP扩展详细教程

    如果用PHP不能再满足你的需求,最好的办法就是开发PHP扩展。这有一些好处: 1、增加自己的特殊功能。 2、保护自己的专利代码。 这是几年前的一篇英文文章,现在已被翻译成中文版的。 作者应该是hshq_cn。 链接是:...

    通过PHP访问MySQL(毕业设计外文翻译)

    Now that you’re comfortable using the MySQL client tools to manipulate data in the database, you can begin using PHP to display and modify data from the database. PHP has standard functions for ...

    Pro PHP Programming 英文原版

    Now, you’ll be able to start with the chapter on PHP for mobile programming and move on to sampling social media applications. You’ll also be guided through new PHP programming language features ...

    PHP讲义 英文原著

    Now more than ever, the Web is a major vehicle for corporate and personal communications. Websites carry satellite images of Earth in its entirety, search for life in outer space, and house personal ...

    PHP Beyond the Web(Apress,2016)

    PHP is no longer just a great scripting language for websites, it’s now a powerful general-purpose programming language. Expand your use of PHP into your back-end systems, server software, data ...

    github-now:自动生成您的GitHub用户个人资料页面

    git clone https://github.com/beyondcode/github-now.git 接下来,将您的.env.example文件复制为.env并配置您的GitHub用户名。 GITHUB_PROFILE=your-github-username 修改您的个人资料 您可以通过编辑resources/...

    slimphp framework

    Going to http://localhost:8000/hello/world will now display "Hello, world". For more information on how to configure your web server, see the Documentation. Tests To execute the test suite, you'll ...

Global site tag (gtag.js) - Google Analytics