Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

PHP°²×°ÅäÖÃ

#./configure --prefix=/usr/local/php5 --with-config-file-path=/usr/local/php5 --with-apxs2=/usr/local/apache2/bin/apxs --with-bz2 --with-curl - --with-curlwrappers --enable-ftp --enable-sockets --disable-ipv6 --with-gd --with-jpeg-dir=/usr/local --with-png-dir=/usr/local --with-freetype-dir=/usr/local --enable-gd-native-ttf --with-iconv-dir=/usr/local --enable-mbstring --enable-calendar --with-gettext --with-libxml-dir=/usr/local --with-zlib --enable-zend-multibyte
--with-pdo-mysql=/usr/local/mysql
--with-mysqli=/usr/local/mysql/bin/mysql_config --with-mysql=/usr/local/mysql #make && make install #±àÒ룬½øÐа²×°¡£ #cp php.ini-dist /usr/local/php/lib/php.ini ÔÚapache2ÖÐÐÞ¸ÄÅäÖÃÎļþ #vi /usr/local/apache2/conf/httpd.conf ÕÒµ½¡°#AddType application/x-gzip .gz .tgz¡± ²¢ÔÚºóÃæ¼ÓÈë AddType application/x-compress .Z AddType application/x-gzip .gz .tgz AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps ÕâÁ½ÐеÄÄ¿µÄÊÇÈÃapacheʶ±ðphp¡£ ÔÙÕÒµ½¡°DirectoryIndex index.html¡± ¼ÓÉÏ index.php ÈÃËü°Ñindex.php×öΪĬÈÏÒ³ ²âÊÔ»·¾³£º cd /usr/local/httpd/htdocs/ # vi /usr/local/httpd/htdocs/index.php ÊäÈ룺 # /usr/local/apache2/bin/apachectl restart ÖØÆôapache·þÎñÆ÷ Àý:ä¯ÀÀÆ÷ÖÐÊäÈ룺http://192.168.xxx.xxx/index.php²âÊÔһϡ£Èç¹û³É¹¦»áÓÐÏà¹ØµÄphpµÄ˵Ã÷£¬Ã»³É¹¦»áÌáʾÄã±£´æÎļþÄÚÈÝ¡£ °²×°ÎÊÌ⣺ PHP5.2.10 Make install ʱ³öÏÖ£º Fatal error: Error: cannot open phar "/usr/local/src/php-5.2.10/pear/install-pear-nozlib.phar" in /path/php5.2.10/pear/install-pear-nozlib.phar on line 795
make[1]: *** [install-pear-installer] Error 255
make: *** [install-pear] Error 2 ½â¾ö·½·¨£º¸ü»»°æ±¾ 2009-11-11 PHP×é³ÌÐò·Åµ½150³öÏÖÎÊÌ⣬ÀàËÆÒÔÏ¡£ ȫվÌáʾSQLSTATE[HY000] [2002] Invalid argument£¬ÀàËÆÐÅÏ¢ÈçÏ£º Fatal error: Uncaught exception 'Zend_Db_Adapter_Exception' with message 'SQLSTATE[HY000] [2002] Invalid argument' in /home/www/private/ZendFramework-1.9.3PL1/library/Zend/Db/Adapter/Pdo/A


Ïà¹ØÎĵµ£º

ÔÚPHPÀï¼ÓÔØmcryptÄ£¿é Smilings

1.ÏÂÔØ°²×°mcrypt
ÏÈÈ¥http://www.sourceforge.netÏÂÔØLibmcrypt,mhash,mcrypt°²×°°ü
2 .ÏȰ²×°Libmcrypt
#tar -zxvf libmcrypt-2.5.8.tar.gz
#cd libmcrypt-2.5.8
#./configure
#make
#make install
˵Ã÷£ºlibmcriptĬÈϰ²×°ÔÚ/usr/local
3.°²×°mhash
#tar -zxvf mhash-0.9.9.9.tar.gz
#cd mhash-0.9.9.9
#./ ......

mysql+phpÎÞ·¨Á¬½Ósql£¨Òѽâ¾ö£©

¸ãÁ˺ܾᣡ£ÖÕÓÚ·¢ÏÖÔ­À´ÊÇȨÏÞÎÊÌâ¡£¡£
2ÐÐÃüÁî¸ã¶¨
grant all privileges on rogue.* to admin@localhost identified by 'admin' with grant option
grant all privileges on rogue.* to admin@'%' identified by 'admin' with grant option
¾­µäÁË¡£¡£¡£
ħÁ¦Ë½·þÍøÒ³¶Ë¸ã¶¨¿©~~ ......

PHP bug??global·¢ÏÖµÄÎÊÌâ

ÈçÏÂphp´úÂë
<?php
$type='a';
$target='type';
$a=array(1,2,3);
a($target);
function a($type)
{
    global $$type;
    var_dump($$type);
}
?>
Ô¤¼ÆÊä³öµÄÊÇstring(1)”a”
¿ÉÊǽá¹ûÊÇ
Notice: Undefined variable: a in D:\web\global.php on ......

дPHP»¹ÊÇZendºÃÓÃ


ÎÒ×îÔç½Ó´¥µÄ±à³Ì¹¤¾ßÊÇDreamweaver£¬ÆäʵӦ¸ÃÊÇ×¼±à³Ì¹¤¾ß°É£¬ÎÒÄÇʱºòÓõĺÃÏñÊÇ
4£¬Èç¹ûÎÒûÓмǴíµÄ»°£¬È»ºóºóÀ´»¹ÓÐÒ»¸ö°æ±¾½ÐUtralµÄ£¬´Ó×î³õÆÚµÄ°æ±¾Ò»Ö±µ½ÏÖÔÚµÄCS4£¬µ±ÄêµÄMicromedia¹«Ë¾ÒѾ­±»Adobe¹«Ë¾
ÊÕ¹ºÁË£¬ÎÒ»¹ÊÇÔÚÓá£ÔÚHTMLµÄ±à¼­·½Ã棬DWÓÐ×ÅÎ޿ɱÈÄâµÄÓÅÊÆ£¬ÎÒÏÖÔÚд.Net»¹ÊÇϰ¹ßÔÚDWÀï½øÐÐÒ³Ãæ²¼¾ ......

PHP·ÖÒ³·½·¨

$pagesize=10; //ÉèÖÃÿһҳÏÔʾµÄ¼Ç¼Êý
$c("localhost","root",""); //Á¬½ÓÊý¾Ý¿â
$rs=mysql_query("select count(*) from tb_product",$conn); //È¡µÃ¼Ç¼×ÜÊý$rs
$myrow = mysql_fetch_array($rs);
$numrows=$myrow[0];

Ɍ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ