在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的配置信息就说明安装成功了。
相关文档:
有时候nginx,apache,mysql,php编译完了想看看编译参数可以用以下方法
nginx编译参数:
#/usr/local/nginx/sbin/nginx -V
CODE:
nginx version: nginx/0.6.32
built by gcc 4.1.2 20071124 (Red Hat 4.1.2-42)
configure arguments: --user=www --group=www --prefix=/usr/local/nginx/ --with-http_stub_status_mo ......
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、遍历: ......
连接:
$conn=mysql_connect ("localhost:3306", "username", "password");
mysql_select_db("DBname");
读:
$exec="select * from stu";
$result=mysql_query($exec);
while($rs=mysql_fetch_object($result))
{
echo $rs->id." & ......
PHPDocument是从你的源代码的注释中生成文档,因此在给你的程序做注释的过程,也就是你编制文档的过程。
从这一点上讲,PHPdoc促使你要养成良好的编程习惯,尽量使用规范,清晰文字为你的程序做注释,同时多多少少也避免了事后编制文档和文档的更新不同步的一些问题。
在phpdocumentor中,注释分为文档性注 ......