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

PHP·ÖÒ³³ÌÐòÔ´Âë

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>PHP·ÖÒ³</title>
</head>
<body>
<?php
$conn=mysql_connect("localhost","root","123456") or die("Êý¾Ý¿âÁ¬½Ó´íÎó".mysql_error());
mysql_select_db("wangyantest",$conn) or die("Êý¾Ý¿â·ÃÎÊ´íÎó".mysql_error());
mysql_query("set names gb2312");
$page=$_GET["page"];
if($page=="")
{$page=1;}
if(is_numeric($page))
{
$page_size=2;  //ÿҳ¶àÉÙÌõÊý¾Ý
$query="select count(*) as total from test order by id desc";
$result=mysql_query($query);
$message_count=mysql_result($result,0,"total");
$page_count=ceil($message_count/$page_size);
$offset=($page-1)*$page_size;
$sql=mysql_query("select * from test order by id desc limit $offset,$page_size");
$row=mysql_fetch_object($sql);
if(!$row)
{
   echo("ÔÝÎÞÈκÎÊý¾Ý£¡");
}
?>
<ul>
<?php
do
{
   ?>
   <li><?php echo "<a href=contnet.php?id=".$row->id.">". $row->titile."|".$row->content."</a>" ?></li>
   <?php
}while($row=mysql_fetch_object($sql));
?>
</ul>
<?php
}
?>
µ±Ç°Ò³Â룺<?php echo $page;?>/<?php echo $page_count;?>
¼Ç¼ÌõÊý£º<?php echo $message_count;?>
<hr/>
<?php
if($page!=1)
{
   echo "<a href=page.php?page=1>Ê×Ò³</a> | ";
   echo "<a href=page.php?page=".($page-1).">ÉÏÒ»Ò³</a>   ";
}
if($page<$page_count)
{
   echo "<a href=page.php?page=".($page+1).">ÏÂÒ»Ò³</a> | ";
   echo "<a href=page.php?page=".$page_count.">βҳ</a>";
}
mysql_free_result($sql);
mysql_close($conn);
?>
</body>
</html>


Ïà¹ØÎĵµ£º

PHP·þÎñÆ÷¶Ëͨ¹ýÃüÃû¹ÜµÀÓëC/C++³ÌÐòͨÐÅ

ÔÚÕ⼸ÌìµÄ¹¤×÷¹ý³ÌÖУ¬ÐèҪʵÏÖPHPÔÚ·þÎñÆ÷¶ËÄÜÓëÆäËû³ÌÐòͨÐÅ¡£ºÍÀϺÎÁ©ÈËÑо¿ÁË°ëÌ죬ÖÕÓÚ´óÖÂŪ³öÁËÒ»¸öÓÃWINDOWSµÄÃüÃû¹ÜµÀͨÐŵķ½·¨¡£
Óм¸µãÐèҪעÒâµÄ£º
PHP·þÎñÆ÷¶ËÎÒÃÇÿ´Î¶¼ÊÇÖØйҽÓÃüÃû¹ÜµÀ¡££¨ÕâÑùд£¬PHP¶Ë´úÂëÁ¿¼«ÆäÉÙ£¬¶øÇÒÒ²ºÜ·½±ã¡££©
ÄÇôÎÒÃÇÓÃC/C++дµÄÃüÃû¹ÜµÀ·þÎñÆ÷ÔòÐèҪÿ´ÎͨÐŶ¼´´½¨Ò»´Î¹ ......

php/jsp RIFF1

Á·ÇÙµÄʱºò°ÑRIFF½Ð×öÒ»¸öÇú×ÓµÄСƬ¶Î£¬ÄÇôÎÒ×Ô¼º¶¨ÒåһϳÌÐòµÄRIFF¾ÍÊÇһС¶Î³ÌÐò°É£¬·ÅһЩÕ⼸Ìì×Ô¼ºÐ´µÄ£¬ÒÔºóÒ²³¤ÆÚ¸üУ¬×÷Ϊ×Ô¼º»ýÀۺͽñºó±à³ÌµÄ²Î¿¼¡£
1. ¸ñʽ»¯ÍøÖ·£¬ÈôûÓÐHTTPÍ·Ôò²åÈëHTTPÍ·
<?php
//add http head to url
function AddHttpHead( &$s )
{
$exist = strstr( $s,"http://" ......

PHP³ÌÐòÔ±×îÒ×·¸10ÖÖ´íÎó


1.²»×ªÒâhtml entities
Ò»¸ö»ù±¾µÄ³£Ê¶£ºËùÓв»¿ÉÐÅÈεÄÊäÈ루ÌرðÊÇÓû§´ÓformÖÐÌá½»µÄÊý¾Ý£© £¬Êä³ö֮ǰ¶¼Òª×ªÒâ¡£
echo $_GET['usename'] ;
Õâ¸öÀý×ÓÓпÉÄÜÊä³ö£º
<scrīpt>/*¸ü¸ÄadminÃÜÂëµÄ½Å±¾»òÉèÖÃcookieµÄ½Å±¾*/</scrīpt>
ÕâÊÇÒ»¸öÃ÷ÏԵݲȫÒþ»¼£¬³ý·ÇÄã±£Ö¤ÄãµÄÓû§¶¼ÕýÈ·µÄÊäÈë¡£ ......

Linux°²×°apache¡¢phpºÍmysql·½·¨

apacheµÄÔ´Âë°²×° 
½«Ñ¹Ëõ°ü½âѹ֮ºó½øÈëÏàÓ¦µÄĿ¼
./configure \   #--------------------Ô¤±àÒëÃüÁî
"--prefix=/usr/local/apache" \  #--------------------°²×°Â·¾¶Îª“/usr/local/apache”
"--with-included-apr" \
"--enable-so" \ #--------------------¿ªÆôÏàÓ¦µÄÀ©Õ¹Ä£¿é ......

һЩ±»ºöÊ PHP º¯Êý£¨ÕûÀí£©

¿´
µ½ÕâƪÎÄÕÂ
£¬µ±Ê±¾ÍÀá±¼Á˺ü¸»Ø£¬ÖصãÍƼöÏ£¬Ë³±ãÎÒ×Ô¼ºÒ²×ö¸öÕûÀí¡£
sys_getloadavg()
Õâ¸öº¯Êý
·µ»Øµ±Ç°ÏµÍ³µÄ¸ºÔؾùÖµÐÅÏ¢
£¨µ±È» Windows
ϲ»ÊÊÓã©£¬ÏêϸÎĵµ¿ÉÒÔ·­ÔÄ PHP µÄÏà¹ØÎĵµ¡£ÎĵµÖÐÓжÎʾÀý´úÂ룬»ù±¾ÉÏÒ²¾ÍÄÜ¿´³öËüµÄÓÃ;ÁË¡£
<?php
$load = sys_getloadavg();
if ($load[0] > 80) ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ