Linux ƽ̨Ï PHP °²×° Æô¶¯
php°²×°
# tar xzvf php-5.2.5.tar.gz
# cd php-5.2.5
./configure --prefix=/home/redadmin/php --with-apxs2=/home/redadmin/apache/bin/apxs --with-mysql=/home/redadmin/mysql --enable-mbstring=all --enable-track-vars
# make && make install
# cp php.ini-dist /home/redadmin/php/lib/php.ini
# cd /home/redadmin/php/lib/
//ÐÞ¸ÄPHP.INIÎļþ
# vi php.ini
// ½«×¢Ê͵ô´úÂë·Å¿ª
extension=php_dbase.dll
extension=php_gd2.dll
extension=php_mbstring.dll
extension=php_mssql.dll
extension=php_mysql.dll
extension=php_mysqli.dll
extension=php_zip.dll
// ÐÞ¸ÄApacheÅäÖÃÎļþ
# vi apache/conf/httpd.conf
// Ìí¼ÓÏÂÃæÎÄ×Ö
LoadModule php5_module modules/libphp5.so
AddType application/x-httpd-php .php .php3 .php4
// ÐÞ¸ÄÏÂÃæÄÚÈÝ
ÐÞ¸ÄÇ°£º
<IfModule dir_module>
DirectoryIndex index.html
</IfModule>
Options Indexes FollowSymLinks
Ð޸ĺó£º
<IfModule dir_module>
DirectoryIndex index.html index.php
</IfModule>
Options FollowSymLinks
// APACHE ÖØÆô¶¯
# cd /home/redadmin/pligg/apache/bin/
# ./apachectl restart
Ïà¹ØÎĵµ£º
PHP»ñȡʱ¼ä´íÎóµÄÐÞÕý·½·¨
½ñÌìÔËÐÐPHP³ÌÐòµÄʱºò£¬ºÜÆæ¹Ö£¬ÎªÊ²Ã´PHP»ñÈ¡µÄʱ¼ä±Èʵ¼Êʱ¼äÕûÕûÉÙÁË8Сʱ£¬ÒÔǰҲûעÒâÕâ¸öÎÊÌ⣬×ÜÒÔΪÊÇʱ¼äÏÔʾ´íÁË£¬ÊÇ°²×°Èí¼þµÄÎÊÌ⣬½ñÌìÔÚÍøÉϲéÁËÏÂ×ÊÁÏ£¬ÔÀ´ÁíÓÐÔÒò¡£
ÆäʵÕâºÍʱÇøÓйأ¬PHPĬÈÏ»ñÈ¡0ʱÇø¿ªÊ¼µÄʱ¼ä£¬ÖйúÔÚ¶«°ËÇø£¬Òò´Ë£¬ÎÒÃÇÖÐ ......
test.php -------------------------------------------------------------------------------------
echo $_SERVER['DOCUMENT_ROOT'].""; //»ñµÃ·þÎñÆ÷Îĵµ¸ù
echo $_SERVER['PHP_SELF'].""; //»ñµÃÖ´ÐиôúÂëµÄÎļþ·þÎñÆ÷¾ø¶Ô·¾¶
/*
phpÊÖ²áÉϵĽâÊÍ£º “PHP_SELF” µ±Ç°ÕýÔÚÖ´Ðнű¾µÄÎļþÃû£¬Óë docum ......
basename: ·µ»Ø²»º¬Â·¾¶µÄÎļþ×Ö·û´®¡£
chgrp: ¸Ä±äÎļþËùÊôµÄȺ×é¡£
chmod: ¸Ä±äÎļþµÄÊôÐÔ¡£
chown: ¸Ä±äÎļþµÄÓµÓÐÕß¡£
clearstatcache: Çå³ýÎļþ״̬¿ìÈ¡¡£
copy: ¸´ÖÆÎļþ¡£
delete: ÎÞÓõÄÏîÄ¿¡£
dirname: È¡µÃ·¾¶ÖеÄĿ¼Ãû¡£
diskfreespace: È¡µÃĿ¼ËùÔÚµÄÊ£Óà¿ÉÓÿռ䡣
fclose: ¹Ø±ÕÒÑ´ò¿ªµÄ ......
JSON
»ù
ÓÚJavaScript Programming Language, Standard ECMA-262 3rd Edition -
December 1999µÄÒ»¸ö×Ó¼¯¡£JSON²ÉÓÃÍêÈ«¶ÀÁ¢ÓÚÓïÑÔµÄÎı¾¸ñʽ£¬µ«ÊÇҲʹÓÃÁËÀàËÆÓÚCÓïÑÔ¼Ò×åµÄÏ°¹ß£¨°üÀ¨C, C++, C#, Java
, JavaScript, Perl, PythonµÈ£©¡£ÕâЩÌØÐÔʹJSON³ÉΪÀíÏëµÄÊý¾Ý½»»»ÓïÑÔ¡£
JSON½¨¹¹ÓÚÁ½Öֽṹ£º
“Ãû
³ ......