wamp setup

1.Appache
a.在httpd.cfg中添加以下配置

LoadModule php5_module C:/Green/php_5_3_5_Win32_VC6_x86/php5apache2_2.dll
PHPIniDir "C:/Green/php_5_3_5_Win32_VC6_x86"
AddType application/x-httpd-php .php .phtml


Listen 8888


b.注释掉DocumentRoot
c.可以添加一个至多个虚拟目录

<IfModule dir_module>
DirectoryIndex index.php
Alias /phpmyadmin "D:/_MyApacheVirDir/phpMyAdmin_3_3_10_all_languages"
<Directory "D:/_MyApacheVirDir/phpMyAdmin_3_3_10_all_languages">
Order allow,deny
Allow from all
</Directory>
</IfModule>


<IfModule dir_module>
DirectoryIndex index.php
Alias /discuz "D:/_MyApacheVirDir/Discuz_6.0.0_SC_UTF8"
<Directory "D:/_MyApacheVirDir/Discuz_6.0.0_SC_UTF8">
Order allow,deny
Allow from all
</Directory>
</IfModule>

<IfModule dir_module>
DirectoryIndex index.php
Alias /mytest "D:/_MyApacheVirDir/my_test"
<Directory "D:/_MyApacheVirDir/my_test">
Order allow,deny
Allow from all
</Directory>
</IfModule>


2.Php
a.rename php.ini-development to php.ini
b.在php.ini中指定扩展模块

extension_dir = "C:/Green/php_5_3_5_Win32_VC6_x86/ext"


3.测试 Apache+php
a.在my_test目录下放置testphp.php

<?php
phpinfo();
?>

b.测试

localhost/mytest/test.php

4.测试mysql
a.在php.ini中开启支持mysql

extension=php_mysql.dll
extension=php_mysqli.dll

a.在my_test目录下放置testmysql.php

<?php
$conn=mysql_connect("localhost","root","root");
if($conn){
echo "connected";
}else{
echo "failed";
}
?>

5.安装phpadmin
a.解压到虚拟目录
b.在httpd.cfg中配置该虚拟目录
c.登录测试
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值