wamp setup_PHP_编程开发_程序员俱乐部

中国优秀的程序员网站程序员频道CXYCLUB技术地图
热搜:
更多>>
 
您所在的位置: 程序员俱乐部 > 编程开发 > PHP > wamp setup

wamp setup

 2013/5/19 14:50:52  anonymousstone  程序员俱乐部  我要评论(0)
  • 摘要:1.Appachea.在httpd.cfg中添加以下配置LoadModulephp5_moduleC:/Green/php_5_3_5_Win32_VC6_x86/php5apache2_2.dllPHPIniDir"C:/Green/php_5_3_5_Win32_VC6_x86"AddTypeapplication/x-httpd-php.php.phtmlListen8888b.注释掉DocumentRootc.可以添加一个至多个虚拟目录<IfModuledir_module>
  • 标签:
1.Appache
    a.在httpd.cfg中添加以下配置
class="java" name="code">
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.登录测试
  • 相关文章
发表评论
用户名: 匿名