php安装流水账

1.安装好默认的apache服务器

2.将php的zip包解压缩到c:\php,并将这个目录加入path的环境变量

3.修改httpd.conf,加入

#================================================================
# For PHP 5 do something like this:
LoadModule php5_module "C:/php/php5apache2_2.dll"
AddType application/x-httpd-php .php

# configure the path to php.ini
PHPIniDir "C:/php"
#================================================================

5.将c:\php目录下的php.ini-dist改名为php.ini

如果想支持php读取mysql,将php.ini中下面的注释去掉

;extension=php_msql.dll

6.如想改变www路径,修改

DocumentRoot "C:/www";这个是非虚拟主机的配置方法

<Directory "C:/www">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.2/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   Options FileInfo AuthConfig Limit
    #
    AllowOverride None

    #
    # Controls who can get stuff from this server.
    #
    Order allow,deny
    Allow from all

</Directory>

7.如果想修改默认主页,修改

<IfModule dir_module>
    DirectoryIndex index.html index.php
</IfModule>

8.测试php代码

          <?php

               echo "HelloWorld!<br>";

               phpinfo();

          ?>

转载于:https://www.cnblogs.com/fanzi2009/archive/2009/08/13/1545341.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值