PHP±à³ÌµÄÏȽø¼¼Êõ
ËäÈ»PHPÌṩÁ˺ܶ๦ÄÜÎÒÃÇ£¬µ«ÓÐЩÊÂÇ黹ûÓд¦ÀíÕâЩ·Ç³£·½±ã¡£ÀýÈ磬PHPÌṩµÄÈÕÆÚ¹¦ÄÜ£¬Ê±¼äºÜÓÐÏÞ¡£ MySQLÒѾÌṩÁËÐí¶àÎÒÃÇÕâЩ¹¦ÄÜ¡£ÎÒ¿ÉÒÔʹÓÃMySQLº¯ÊýÀ´´¦ÀíPHPµÄ¹ý³Ì£¿ÎÒÔÚÏÂÃæµÄ³¢ÊÔ¡£
“£¿ PHPµÄ
$ data_time =“1998-12-31 23:59:59”;
$ connect_id = mysql_connect£¨'±¾µØÖ÷»ú'£©;
$ query_id = mysql_query£¨“Ñ¡ÔñDATE_ADD£¨'$ data_time'£¬¼ä¸ô1Ä꣩”£¬$ connect_id£©;
$ data_time = mysql_result£¨$ query_id£¬0£©;
mysql_close£¨$ connect_id£©;
»ØÉù$ data_time;
£¿ “
Õþ¸®Ó¦¼³È¡¾Ñ飬ÎÒÃÇÔÚ±à³Ì¹ý³ÌÖÐÒ²¿ÉÒÔʹÓÃmysqlÌṩµÄÆäËûÖ°ÄÜ¡£
µ±È»£¬¹¦ÄܺÍʹÓÃÌṩÁËMySQLµÄBaituoÄãÓ¦¸ÃÈ¥µÄÊֲᡣ
²»Êʵ±µÄ£¬ÇëÖ¸Õý£¡
Ïà¹ØÎĵµ£º
#apt-get install apache2
//°²×°apahce2
#apt-get install php5
//°²×°php5
#apt-get install mysql-server
//°²×°mysql·þÎñ¶Ë
#apt-get install mysql-myclient
//°²×°mysqlµÄ¿Í»§¶Ë
#apt-get install php-mysql
//°²×°php-mysqlµÄÁ¬½á
apache+php+mysql »·¾³ÒѾ´î½¨ºÃÁË
½«ÒÔϵķþÎñÖØÆôÒ»ÏÂ
#/et ......
ÎÊÌ⣺
ÄãÏë´´½¨Ò»¸ö¶ÔÏ󣬲¢ÔÚÆäÖÐÌí¼ÓһЩÊôÐÔ£¬µ«ÊÇÄãÈ´²»Ïë°ÑËü×÷Ϊһ¸öÃ÷È·µÄÀàÕýʽµØ¶¨ÒåËü¡£ÕâÒ»µãÔÚһЩÇé¿öÏÂÊÇÏ൱ÓÐÓõģ¬ÀýÈçµ±ÄãÐèÒª¶¨ÒåÒ»¸ö·½·¨À´·µ»Ø´øÓÐijЩÊôÐÔ£¨²»È·¶¨µÄ£©µÄ¶ÔÏóʱ£¬¾ÍÈçͬ´Ómysql_fetch_object( ) »òÕß imap_header( )µÄʹÓÃÒ»Ñù¡£
һάÊý×é,ÎÒÏÖÔÚÌØ±ðϲ»¶°ÑËüд³É¶ÔÏó,ÒòΪ¼üÅÌ´ ......
PHPÊÇÒ»ÃÅ¿ª·¢Ëٶȿ죬ÔËÐÐËÙ¶È¿ìµÄÓïÑÔ£¬µ«ÊÇËüÒ²ÓÐÖÂÃüȱµã£¬ÎÞ¶àỊ̈߳¨ËäÈ»ApacheµÄ·þÎñÆ÷ÔÚÁíÒ»Ö̶ֳÈÉÏÃÖ²¹ÁËÕâÖÖȱÏÝ£¬µ«ÊÇÔÚ±àдһЩÐèÒª¸ß²¢·¢²¢ÇÒ¿¼ÂÇЧÂʵijÌÐòÏ£¬Ëü»¹ÊÇÃ÷ÏÔ²»×㣩¡£
µ«ÊÇPHP¿ÉÒÔ´ó´óËõ¶Ì¿ª·¢ÖÜÆÚ£¬Ó뿪·¢³É±¾£¨±ÈÈçPHP¶ÔÓÚ³ÌÐòÒªÇóµÄÃż÷ºÜµÍ£©¡£
×ÜÌåÀ´Ëµ£¬PHPºÜÊʺϿª·¢ÍøÕ¾À´Ó㬶øÔÚ¿ª·¢ ......
phpÎļþ
<?php
mysql_connect("localhost","","");
mysql_query("set names 'gb2312'");
mysql_select_db("shop");
$sqlstr="select * from goods";
require 'smarty/libs/Smarty.class.php';
$smarty = new Smarty;//ÉèÖø÷¸öĿ¼µÄ·¾¶£¬ÕâÀïÊǰ²×°µÄÖØµã
$smarty->template_dir ="smarty/templates/templa ......
Õ⼸Ì죬ÎÒÔÚѧϰPHPÓïÑÔÖеÄSPL
¡£
Õâ¸ö¶«Î÷Ó¦¸ÃÊôÓÚPHPÖеĸ߼¶ÄÚÈÝ£¬¿´ÉÏÈ¥ºÜ¸´ÔÓ£¬µ«ÊǷdz£ÓÐÓã¬ËùÒÔÎÒ×öÁ˳¤Æª±Ê¼Ç¡£²»È»¼Ç²»×¡£¬ÒÔºóÒªÓõÄʱºò£¬»¹ÊÇÒª´ÓͷѧÆð¡£
ÓÉÓÚÕâÊǹ©×Ô¼º²Î¿¼µÄ±Ê¼Ç£¬²»Êǽ̳̣¬ËùÒÔдµÃ±È½Ï¼òµ¥£¬Ã»Óжà½âÊÍ¡£µ«ÊÇÎÒÏ룬Èç¹ûÄãÊÇÒ»¸öÊìÁ·µÄPHP5³ÌÐòÔ±£¬Ó¦¸Ã×ãÒÔ¿´¶®ÏÂÃæµÄ²ÄÁÏ£¬¶øÇÒ» ......