在Windows XP下配置PHP和Apache环境
在windows操作系统配置PHP环境,可以用IIS做应用服务器,也可以使用Apache做应用服务器。本文介绍在Windows XP操作系统下配置PHP和Apache环境。
准备工作:
1、在http://windows.php.net/download/下载PHP程序包,因为用Apache做应用服务器,选择用VC6编译的PHP程序包(如果用IIS做应用服务器,选择用VC9编译的PHP程序包)。
2、在http://httpd.apache.org/download.cgi下载Apache的安装程序apache_2.2.14-win32-x86-openssl-0.9.8k.msi。
安装步骤:
1、首先安装Apache,双击执行msi程序即可。
2、安装PHP,解压zip包至c:\php中。
3、把c:\php\php5ts.dll放到c:\windows\system32目录中。
4、把c:\php\php.ini-development复制到c:\windows目录下,并重命名为php.ini。
5、停止apache服务器,在Apache安装目录的conf\httpd.conf中,加入如下两行,以使 PHP 作为 Apache 的 PHP-Module 安装:
LoadModule php5_module "c:/php/php5apache2_2.dll"
AddType application/x-httpd-php .php
测试:
1、启动Apache。
2、编写脚本test.php,放在Apache安装目录的htdocs目录下(可以通过更改http.conf更改目录)。test.php的内容如下:
<html>
<head>
<title>
hello
</title>
</head>
<body>
<?php phpinfo(); ?>
</body>
</html>
3、在IE中输入:http://localhost/test.php(取决于Apache的配置,如果Apache的服务端口在8080,则为http://localhost:8080/test.php),如果显示出了PHP的配置信息就说明安装成功了。
相关文档:
//创建文件夹的方法
//$path 为文件夹参数,如 (c:/program files/makedir)
function createFolders($path) {
if (!file_exists($path)) {
$this->createFolders(dirname($path));
mkdir($path, 0777);
&n ......
PHP Security for Deployers
If you're a Developer
READ THIS and then work with your SysAdmins to step through any and all the layers of security designed to protect your apps.
Example:
Traffic must first pass through a SPI firewall (ensure that ONLY necessary ports/protocols are permitted; en ......
1、数组的申请和使用:
$array=array(array(2,324,34));
echo $array[0][1];
直接申请使用:
$student[0][0]="我";
$student[0][1]="是";
$student[1][0]="谁";
$student[1][1]="维";
echo $student[1][0];
2、遍历: ......
PHPDocument是从你的源代码的注释中生成文档,因此在给你的程序做注释的过程,也就是你编制文档的过程。
从这一点上讲,PHPdoc促使你要养成良好的编程习惯,尽量使用规范,清晰文字为你的程序做注释,同时多多少少也避免了事后编制文档和文档的更新不同步的一些问题。
在phpdocumentor中,注释分为文档性注 ......
<?
$_mysqlhost="localhost";
$_mysqluser="root";
$_mysqlpass="";
$_mysqldata="mydata";
$_connect=mysql_connect($_mysqlhost,$_mysqluser,$_mysqlpass) or die ("错误".mysql_error());
mysql_query("SET character_set_connection=utf8, character_set_results=utf8, character_set_client=binary", $ ......