首页 / 代码程序 / PHP

‘PHP’ 分类文章存档

PHP 编译笔记

2009-01-03 18:08

1. theplanet WHM 编译笔记。php version 5.2.5

./configure --enable-bcmath --enable-calendar --enable-ftp
--enable-gd-native-ttf --enable-libxml --enable-magic-quotes
--enable-mbstring --enable-pdo=shared --enable-sockets
--prefix=/usr/local --with-apxs2=/usr/local/apache/bin/apxs
--with-curl=/opt/curlssl/ --with-freetype-dir=/usr --with-gd
--with-gettext --with-imap=/opt/php_with_imap_client/
--with-imap-ssl=/usr --with-jpeg-dir=/usr --with-kerberos
--with-libexpat-dir=/usr --with-libxml-dir=/opt/xml2/
--with-mcrypt=/opt/libmcrypt/ --with-mhash=/opt/mhash/
--with-mime-magic --with-mysql=/usr
--with-mysql-sock=/var/lib/mysql/mysql.sock --with-openssl=/usr
--with-openssl-dir=/usr --with-pdo-sqlite=shared
--with-png-dir=/usr --with-sqlite=shared --with-ttf
--with-xmlrpc --with-xpm-dir=/usr --with-zlib
--with-zlib-dir=/usr

2. Shanghai Server 默认编译笔记。php version: 5.1.6 阅读全文 »

php教程 - 学习php之第一天

2008-12-18 04:58

想想学习ASP已经有些日子了,但是很多项目都需要用到PHP,从今天开始,坚持学习PHP,我这里暂时是以 Apache web server 和 access作为WEB服务器和数据库,在php-5.2.5.5下的环境做的程序。

下面开始学习简单PHP的语法。 阅读全文 »

对目录进行密码保护的PHP代码

2006-02-15 00:50

下面的代码可以对你的目录进行保护:
<?
//part 1
if (!isset($PHP_AUTH_USER))
{
header("WWW-Authenticate: Basic realm=\"Spoono Password.\"");
Header("HTTP/1.0 401 Unauthorized");
exit;
}

//part 2

else if(($PHP_AUTH_USER=="spoono") && ($PHP_AUTH_PW=="spoono"))
{
echo "You got in...";
//place the code for the whole user page in here
//you can also set up a redirect to the user page if you want
}
阅读全文 »