CentOS5 ϰ²×°Apache2+PHP5+MySQL
°²×°apache
# tar -zvxf httpd-2.2.14.tar.gz
# cd httpd-2.2.14
# ./configure --prefix=/usr/local/apache2 --enable-so --enable-rewrite
# make
# make install
°²×°MySQL
#yum -y install mysql-server
#yum -y install mysql-devel
°²×° jpeg7
½¨Á¢Ä¿Â¼£º
# mkdir -p /usr/local/jpeg7
# mkdir -p /usr/local/jpeg7/bin
# mkdir -p /usr/local/jpeg7/lib
# mkdir -p /usr/local/jpeg7/include
# mkdir -p /usr/local/jpeg7/man
# mkdir -p /usr/local/jpeg7/man1
# mkdir -p /usr/local/jpeg7/man/man1
# tar -zvxf jpegsrc.v7.tar.gz
# cd jpeg-7
# ./configure --prefix=/usr/local/jpeg7/ --enable-shared --enable-static
# make; make install
°²×°libpng
# tar -zvxf libpng-1.2.40.tar.gz
# cd libpng-1.2.40
# cp scripts/makefile.linux makefile
# make
# make install
°²×° freetype
# tar -zvxf freetype-2.1.10.tar.gz
# cd freetype-2.1.10
# mkdir -p /usr/local/freetype
# ./configure --prefix=/usr/local/freetype
# make
# make install
°²×°zlib
#tar -zxvf zlib-1.2.3.tar.gz
#cd zlib.1.2.3
# ./configure
# make
# make install
°²×°GD¿â
# tar -zvxf gd-2.0.35.tar.gz
# cd gd-2.0.35
# ./configure --prefix=/usr/local/gd2 --with-jpeg=/usr/local/jpeg7/ --with-png=/usr/local/lib/ --with-zlib=/usr/local/lib/ --with-freetype=/usr/local/freetype/
# make
# make install
°²×°PHP
# rpm -ivh libxml2-2.6.26-2.1.2.8.i386.rpm
# rpm -ivh libxml2-devel-2.6.26-2.1.2.8.i386.rpm
# rpm -ivh pkgconfig-0.21-2.el5.i386.rpm
# yum -y install curl
# tar -zxvf php-5.2.10.tar.gz
# cd php-5.2.10
# ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql --with-gd=/usr/local/gd2/ --with-curl --with-jpeg-dir=/usr/local/jpeg7 --with-freetype-dir=/usr/local/freetype/
#Èç¹ûÉÏÃæµÄµÇ¼·¢Éú mysql configure failed ´íÎó ÔòÏÈÖ´ÐÐÏÂÃæµÄÅäÖã¬ÔÙÖ´ÐÐÉÏÃæÅäÖþÍÐÐ(ºÃÏñÊǵÚÒ»´ÎÖ´Ðв»ÄܰüÀ¨GD¿â)
# ./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql
# make
# make install
# cp php.ini-recommended /usr/local/lib
Ïà¹ØÎĵµ£º
<?php
/*
ͼƬ´¦ÀíÀࣺËõÂÔ£¬²Ã¼ô£¬Ô²½Ç£¬Çãб
*/
class resizeimage
{
//ͼƬÀàÐÍ
var $type;
//ʵ¼Ê¿í¶È
var $width;
//ʵ¼Ê¸ß¶È
var $height;
//¸Ä±äºóµÄ¿í¶È
var $resiz ......
phpÌØÊâ×Ö·û¹ýÂË
1¡¢¹ýÂ˱êÇ©(HTML)£ºstrip_tags()
ÀýÈ磺
<?php
$text = '<?php ?><p>Test paragraph.</p><!-- Comment -
-> <a href=http://topic.csdn.net/u/20090311/09/"#fragment">Other text</a>';
echo strip_tags($text);
echo "\n";
// ÔÊÐíʹÓÃ<p>ºÍ< ......
PHP »·¾³ÅäÖÃ
PHP ¸ÅÊö
£º
PHPÊÇÓ¢Îij¬¼¶Îı¾Ô¤´¦ÀíÓïÑÔHypertext PreprocessorµÄËõд¡£PHP ÊÇÒ»ÖÖ HTML ÄÚǶʽµÄÓïÑÔ£¬ÊÇÒ»ÖÖÔÚ·þÎñÆ÷¶ËÖ´ÐеÄǶÈëHTMLÎĵµµÄ½Å±¾ÓïÑÔ£¬ÓïÑԵķç¸ñÓÐÀàËÆÓÚCÓïÑÔ£¬±»¹ã·ºµÄÔËÓá£
PHP ¹¦ÄÜ
£º
PHP ¶ÀÌØµÄÓï·¨»ìºÏÁË C¡¢Java¡¢Perl ÒÔ¼° PHP ×Ô´´ÐµÄÓï·¨¡£Ëü¿ÉÒÔ±È CGI »òÕß Perl ¸ü¿ ......
PHP£¬ÊÇÓ¢Îij¬¼¶Îı¾Ô¤´¦ÀíÓïÑÔHypertext PreprocessorµÄËõд¡£PHP ÊÇÒ»ÖÖ HTML ÄÚǶʽµÄÓïÑÔ£¬ÊÇÒ»ÖÖÔÚ·þÎñÆ÷¶ËÖ´ÐеÄǶÈëHTMLÎĵµµÄ½Å±¾ÓïÑÔ£¬ÓïÑԵķç¸ñÓÐÀàËÆÓÚCÓïÑÔ£¬±»¹ã·ºµÄÔËÓá£
PHP ¶ÀÌØµÄÓï·¨»ìºÏÁË C¡¢Java¡¢Perl ÒÔ¼° PHP ×Ô´´ÐµÄÓï·¨¡£Ëü¿ÉÒÔ±È CGI »òÕß Perl ¸ü¿ìË ......
´ËÎÄյݲװ·½·¨ÊÊÓÃÓÚWindows XPϵÄApache+PHP+MySQL°²×°¡£ 1. °²×°»·¾³
²Ù×÷ϵͳÊÇ Windows XP ÖÐÎİæ, Apache, PHP, MySQL µÄ×îа汾ÊǽØÖ¹µ½ 2007.09.07£¬·Ö±ðÔÚÆä¹ÙÍøÏÂÔØµÄ:
* Apache 2.2.6£ºhttp://apache.mirror.phpchina.com/httpd/binaries/win32/
* PHP 5.2.4 (Windows Binaries PHP 5.2.4 z ......