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

[zz]Ò»¸ö³¬¼¶¼òµ¥µÄphpͶƱϵͳ£¬²»Ê¹ÓÃÊý¾Ý¿â

±¾ÎÄת×ÔÎҵIJ©¿Í£º(my.unix-center.net/~xiaoshe)
http://my.unix-center.net/~xiaoshe/2010/04/19/%E4%B8%80%E4%B8%AA%E8%B6%85%E7%BA%A7%E7%AE%80%E5%8D%95%E7%9A%84php%E6%8A%95%E7%A5%A8%E7%B3%BB%E7%BB%9F%EF%BC%8C%E4%B8%8D%E4%BD%BF%E7%94%A8%E6%95%B0%E6%8D%AE%E5%BA%93/
´ÓÍøÉÏ·¢ÏÖµÄÒ»¸ö³¬¼¶¼òµ¥µÄ»ùÓÚphpµÄͶƱϵͳ£¬²»ÐèÒªÊý¾Ý¿â£¬Ê¹ÓÃÎļþÀ´´¢´æÍ¶Æ±½á¹û¡£
²Î¿¼ÍøÒ³Á´½Ó:
http://2008.gr0w.com/articles/code/php_5_star_rating_system_using_hreview/index.php
´úÂëÈçÏ£¬ÆäÖÐÎÒ¼ÓÁË×¢ÊÍ:
< ?

// User settings
$rater_ip_voting_restriction = true; // restrict ip address voting (true or false)
$rater_ip_vote_qty=1; // how many times an ip address can vote
$rater_already_rated_msg="You have already rated this item. You were allowed ".$rater_ip_vote_qty." vote(s).";
$rater_not_selected_msg="You have not selected a rating value.";
$rater_thankyou_msg="Thankyou for voting.";
$rater_generic_text="this item"; // generic item text
$rater_end_of_line_char="\n"; // may want to change for different operating systems



if(!isset($rater_id)) $rater_id=1;
if(!isset($rater_item_name)) $rater_item_name=$rater_generic_text;


// DO NOT MODIFY BELOW THIS LINE
$rater_filename='item_'.$rater_id.".rating";
$rater_rating=0;
$rater_stars="";
$rater_stars_txt="";
$rater_rating=0;
$rater_votes=0;
$rater_msg="";

// Rating action==½á¹ûÊǽ«Í¶Æ±µÄ½á¹ûдÈëÎļþÖУ¬Èç¹ûûÓÐsubmit,Ôò²»Ö´ÐУ¬Èç¹ûûÓÐÆÀ·Ö¾ÍsubmitÁË£¬ÔòÏÔʾ¸æ¾¯ÐÅÏ¢
if(isset($_REQUEST["rate".$rater_id])){ //ÅжÏsubmit°´Å¥ÓÐûÓб»°´ÏÂ
if(isset($_REQUEST["rating_".$rater_id])){//ÔÚ´Ë»ù´¡ÉÏÅжÏÓû§°´ÏÂsubmit°´Å¥Ê±ÊÇ·ñûÓÐÆÀ·Ö£¬Ã»ÓеϰÔò¸ø³öÒ»¸ö¸æ¾¯ÏûÏ¢
while(list($key,$val)=each($_REQUEST["rating_".$rater_id])){//½«Óû§µÄÆÀ·ÖÖµ´æÎªÖмä±äÁ¿rater_ratingÖµ,Æäʵ¾õµÃûÓбØÒªÓÃwhileµÄ±í´ïʽ
$rater_rating=$val;
}
$rater_ip = getenv("REMOTE_ADDR");//µÃµ½Óû§µÄip
$rate


Ïà¹ØÎĵµ£º

ÀûÓÃphp»ñÈ¡Êý¾Ý¿âÖÐËùÓÐÐÅÏ¢¿É²Î¿¼phpMyAdmin


<?php
@mysql_connect("localhost", "root","1981427") //Ñ¡ÔñÊý¾Ý¿â֮ǰÐèÒªÏÈÁ¬½ÓÊý¾Ý¿â·þÎñÆ÷
or die("Êý¾Ý¿â·þÎñÆ÷Á¬½Óʧ°Ü");
$dbs = mysql_list_dbs(); //µ÷ÓÃmysql_list_dbsº¯Êý
while ($array = mysql_fetch_row($dbs)) //Ñ­»·Êä³öËùÓеÄÊý¾Ý¿âÃû³Æ
{
echo "$array[0]<BR>";
}
?>
& ......

php define() º¯Êý¼°defined£¨£©º¯ÊýµÄÓ÷¨


The define() function defines a constant.
define()º¯ÊýµÄ×÷ÓÃÊÇ£º¶¨ÒåÒ»¸ö³£Á¿¡£
Constants are much like variables, except for the following differences:
³£Á¿[constant]Óë±äÁ¿[variable]ÓкܶàÏàËÆµÄµØ·½£¬Òò´Ë£¬ºÜÈÝÒ×»ìÏý£»ÏÂÃæ£¬ÎÒÃÇÁоÙһϳ£Á¿[constant]Óë±äÁ¿[variable]Ö®¼äµÄ²»Í¬µã£º
A constant's ......

php»·¾³´î½¨

phpÏÂÔØ£º
http://windows.php.net/download/
Ñ¡Ôñ
VC6 x86 Thread Safe (2010-Mar-04 20:11:08)
VC6 x86´ú±í Apache HTTP Server (httpd) 2.2.15 ºÍPHP½áºÏ
apacheÏÂÔØ£º
http://httpd.apache.org/download.cgi#apache22
Ñ¡Ôñ2.2.15
httpd-2.2.15-win32-x86-no_ssl.msi [PGP] [MD5] [SHA1]
apache services 2.2Ð ......

php»ñÈ¡form±íµ¥ÖÐnameÏàͬµÄ±íµ¥Ïî

Ô­ÎĵØÖ·£ºhttp://hi.baidu.com/pengpeng5047/blog/item/c3f3b003d0452a034bfb519f.html
±ÈÈçÏÂÃæµÄ±íµ¥£º
/*form.php*/
<form action="getform.php" method="post">
<table border="1">
<tr>
<th>ÐÕÃû</th>
<th>ѧºÅ</th>
</tr>
<tr>
<td>ÕÅÈý< ......

Ò»¶Î¼òµ¥µÄphp·ÖÒ³´úÂëʾÀý


Ò»¸ö¼òµ¥µÄphp·ÖÒ³³ÌÐò,´úÂëÀï¼Óºì²¿·Ö¿ÉÒÔ¸ù¾Ýʵ¼ÊÄÚÈݸü»».Á¬½ÓÊý¾Ý¿âµÄµØ·½Ê¡ÂÔÁË!
<?php
..................Á¬½ÓÊý¾Ý¿â
............................Ñ¡ÔñÊý¾Ý¿â
$pagesize=5;  //¶¨ÒåÿҳÏÔʾ¶àÉÙÌõ¼Ç¼
$page=isset($_GET["page"])?intval($_GET["page"]):1;   //¶¨ÒåpageµÄ³õʼֵ,Èç¹ûget ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ