php±í¸ñÊä³ö
<?
//ÐÂÎÅÀà±ð
$query_cat="select * from $dbtable1";
$result_cat=mysql_query($query_cat) or die("<mce:script type="text/javascript"><!--
alert('Ìáʾ£º²éÑ°ÐÂÎÅÀà±ðʧ°Ü£¬Çë¸ú¹ÜÀíÔ±ÁªÏµ')
// --></mce:script>");
if(!$result_cat)
{
echo "ûÓÐÀà±ð";
}
else
{
while($row_cat=mysql_fetch_array($result_cat))
{
echo "<table width='100%' border='0' cellspacing='1' cellpadding='1' bgcolor=#000000>";
echo "<tr>";
echo "<td bgcolor=#F1DAB1>";
echo" == $row_cat[title] £½£½</td></tr>";
echo "<tr><td bgcolor=#fef7ed>";
//±¾Àà±ðÐÂÎűêÌâ
$query_news="select id,title,addtime from $dbtable2 where cateid='$row_cat[id]' order by addtime desc";
$result_news=mysql_query($query_news) or die("<mce:script type="text/javascript"><!--
alert('Ìáʾ£º²éÑ°ÐÂÎűêÌâʧ°Ü£¬Çë¸ú¹ÜÀíÔ±ÁªÏµ')
// --></mce:script>");
if ($result_news)
{
echo "<ul>";
while ($row_news=mysql_fetch_array($result_news))
{
echo "<li><a targer='_self' href="\" mce_href="\""shownews.php?id=$row_news[id]\">$row_news[title](".DateTime("Y-m-d "."H:i",$row_news['addtime']).")</a>";
}
echo"</ul>";
echo"<p align=right>";
echo"<a target='_self' href="\" mce_href="\""category.php?cate=$row_cat[id]\">¸ü¶àÐÂÎÅ..</a></p>";
Ïà¹ØÎĵµ£º
1. ½ØÈ¡GB2312ÖÐÎÄ×Ö·û´®
<?php
< ?php
//½ØÈ¡ÖÐÎÄ×Ö·û´®
function mysubstr($str, $start, $len) {
$tmpstr = "";
$strlen = $start + $len;
for($i = 0; $i < ......
PHPµÄÓŵ㣺
¡¡¡¡1. ¿çƽ̨£¬ÐÔÄÜÓÅÔ½£¬¸úLinux/Unix½áºÏ±ð¸úWindows½áºÏÐÔÄÜÇ¿45%£¬²¢ÇҺͺܶàÃâ·ÑµÄƽ̨½áºÏ·Ç³£Ê¡Ç®£¬±ÈÈçLAMP(Linux/Apache/Mysql/PHP)»òÕßFAMP(FreeBSD/Apache/Mysql/PHP)½áºÏ£¬»òÕßÊý¾ÝÓ¦Óù»´ó¿ÉÒÔ¿¼ÂÇ»»PostgreSQL»òÕßOracle£¬Ö§³ÖNÖÖÊý¾Ý¿â¡£(N >= 10)
¡¡¡¡2. Óï·¨¼òµ¥£¬Èç¹ûÓÐѧϰCºÍPerlµÄº ......
phpµ÷ÓÃÍⲿ³ÌÐòµÄ·½·¨Ò»°ãÓÃexec,systemµÈ£¬µ«ÕâÑùÖ´ÐеÄʱºò±ØÐëµÈ´ýÍⲿ³ÌÐò½áÊøºó£¬phpÒ³Ãæ²ÅÄܼÌÐøÖ´ÐУ¬·ñÔòÍøÒ³»áÒ»Ö±µÈ´ý¡£
ÈçºÎ¸Ä±äÕâÖÖÇé¿öÄØ£¿
Ê×ÏÈ
ÒªÖªµÀphpµ÷ÓõijÌÐòĬÈ϶¼ÊÇ·ÅÔÚºǫ́ÔËÐеģ¬¼´Ê¹ÊÇ×ÀÃæ³ÌÐòÔÚ×ÀÃæÒ²¿´²»µ½£¬µ½½ø³ÌÁбí²ÅÄÜ¿´µ½
ÕâÊÇÓÉÓÚphpµ÷ÓóÌÐòÊÇͨ¹ýapacheÀ´Íê³ÉµÄ£ ......
·Ö±ðÏÂÔØÁËphp5.2.10ºÍ5.3.0°æ±¾µÄÔ´Â룬²éÕÒµ½ÀïÃæcall_user_function(ÔÚext/standard/basic_functions.c)µÄ·½·¨¡£
ÔÚ5.2.10°æ±¾Àcall_user_functionÓõÄÊDZê×¼µÄphp º¯ÊýµÄд·¨£¬ÓÃzvalÀàÐÍÀ´´æ´¢½ÓÊյIJÎÊý£¬µ÷ÓÃcall_user_function_exÀ´Ö´ÐÐÓû§µÄ·½·¨¡£Èç¹ûµ÷Óò»³É¹¦Ôò·ÖÎöÊDz»ÊǽÓÊÕµ½µÄ²ÎÊýÀïÓÐʲô´íÎó¡£
µ«Ô ......
ͻȻÏëÆðÁËÔÚÒ»´ÎÃæÊÔµÄʱºòÒªÎÒд³öδÀ´Ò»ÌìÊÇÐÇÆÚ¼¸£¬µ±Ê±Ã»Óиøд³öÀ´¡£ÏÖÔÚÏëÏ뻹ÊǾõµÃ¶ÔdateºÍmktimeµÄ¸ÅÄîºÜÄ£ºý£¬ÔÚÕâÀï¼Ç¼ÏÂÒÔ±¸ºóÓ㺳ÌÐòÈçÏÂ
<?php
echo date( "l dS 0f F Y h£ºi£ºs A" );
echo "<br>";
print("July 1, 2010 is on a " . date("l", mktime(0,0,0,7,11,2010)));
?>
Êä³ö½á¹û ......