PHPħÊõ³£Á¿:__LINE__ __FILE__ __CLASS__
PHP ÏòËüÔËÐеÄÈκνű¾ÌṩÁË´óÁ¿µÄÔ¤¶¨Òå³£Á¿
¡£²»¹ýºÜ¶à³£Á¿¶¼ÊÇÓɲ»Í¬µÄÀ©Õ¹¿â¶¨ÒåµÄ£¬Ö»ÓÐÔÚ¼ÓÔØÁËÕâЩÀ©Õ¹¿âʱ²Å»á³öÏÖ£¬»òÕ߶¯Ì¬¼ÓÔغ󣬻òÕßÔÚ±àÒëʱÒѾ°üÀ¨½øÈ¥ÁË¡£
ÓÐÎå¸öħÊõ³£Á¿¸ù¾ÝËüÃÇʹÓõÄλÖöø¸Ä±ä¡£ÀýÈç __LINE__
µÄÖµ¾ÍÒÀÀµÓÚËüÔڽű¾ÖÐËù´¦µÄÐÐÀ´¾ö¶¨¡£ÕâЩÌØÊâµÄ³£Á¿²»Çø·Ö´óСд£¬ÈçÏ£º
±í 13-1. ¼¸¸ö PHP µÄ“ħÊõ³£Á¿”
Ãû³Æ
˵Ã÷
__LINE__
ÎļþÖеĵ±Ç°Ðкš£
__FILE__
ÎļþµÄÍêÕû·¾¶ºÍÎļþÃû¡£Èç¹ûÓÃÔÚ°üº¬ÎļþÖУ¬Ôò·µ»Ø°üº¬ÎļþÃû¡£×Ô PHP 4.0.2 Æð£¬__FILE__
×ÜÊÇ°üº¬Ò»¸ö¾ø¶Ô·¾¶£¬¶øÔÚ´Ë֮ǰµÄ°æ±¾ÓÐʱ»á°üº¬Ò»¸öÏà¶Ô·¾¶¡£
__FUNCTION__
º¯ÊýÃû³Æ£¨PHP 4.3.0 мӣ©¡£×Ô PHP 5 Æð±¾³£Á¿·µ»Ø¸Ãº¯Êý±»¶¨ÒåʱµÄÃû×Ö£¨Çø·Ö´óСд£©¡£ÔÚ PHP 4
ÖиÃÖµ×ÜÊÇСд×ÖĸµÄ¡£
__CLASS__
ÀàµÄÃû³Æ£¨PHP 4.3.0 мӣ©¡£×Ô PHP 5 Æð±¾³£Á¿·µ»Ø¸ÃÀà±»¶¨ÒåʱµÄÃû×Ö£¨Çø·Ö´óСд£©¡£ÔÚ PHP 4
ÖиÃÖµ×ÜÊÇСд×ÖĸµÄ¡£
__METHOD__
ÀàµÄ·½·¨Ãû£¨PHP 5.0.0 мӣ©¡£·µ»Ø¸Ã·½·¨±»¶¨ÒåʱµÄÃû×Ö£¨Çø·Ö´óСд£©¡£
Ïà¹ØÎĵµ£º
<?php
function genpage(&$sql,$page_size=10)
{
global $pages,$sums,$eachpage,$page; //×ÜÒ³Êý£¬×ܼǼ£¬Ã¿Ò³Êý£¬µ±Ç°Ò³
$page = $_GET["page"];
if($page ==0)$page =1;
$eachpage = $page_s ......
PHPµÄÈÕÆÚʱ¼äº¯Êýdate()
1£¬Äê-ÔÂ-ÈÕ
echo date('Y-m-j');
2007-02-6
echo date('y-n-j');
07-2-6
´óдY±íʾÄêËÄλÊý×Ö£¬¶øСдy±íʾÄêµÄÁ½Î»Êý×Ö£»
Сдm±íʾÔ·ݵÄÊý×Ö(´øÇ°µ¼)£¬¶øСдnÔò±íʾ²»´øÇ°µ¼µÄÔ·ÝÊý×Ö¡£
echo date('Y-M-j');
2007-Feb-6
echo date('Y-m-d');
2007-02-06
´óдM±íʾÔ·ݵÄ3¸öËõÐ´× ......
function delfile($dir)
{
if (is_dir($dir))
{
$dh=opendir($dir);
while (false !== ( $file = readdir ($dh)))
{
if($file!="." && $file!="..")
{
$fullpath=$dir."/".$file;
if(!is_dir($fullpath))
{
unlink($fullpath);
}
......
SQL²éѯ»º´æ
Êʺ϶ÁÕß
±¾½Ì³ÌÊʺÏÓÚÄÇЩ¶Ô»º´æSQL²éѯÒÔ¼õÉÙÊý¾Ý¿âÁ¬½ÓÓëÖ´ÐеĸºÔØ¡¢Ìá¸ß½Å±¾ÐÔÄܸÐÐËȤµÄPHP³ÌÐòÔ±¡£
¸ÅÊö
Ðí¶àÕ¾µãʹÓÃÊý¾Ý¿â×÷ΪվµãÊý¾Ý´æ´¢µÄÈÝÆ÷¡£Êý¾Ý¿â°üº¬Á˲úÆ÷ÐÅÏ¢¡¢Ä¿Â¼½á¹¹¡¢ÎÄÕ»òÕßÁôÑÔ±¾£¬ÓÐЩÊý¾ÝºÜ¿ÉÄÜÊÇÍêÈ«¾²Ì¬µÄ£¬ÕâЩ½«»á´ÓÒ»¸ö»º´æϵͳÖеõ½µÄ¼«´óºÃ´¦¡£
ÕâÑùÒ»¸öϵͳͨ¹ý°ÑS ......
Ä¿Ç°LAMP (Linux + Apache + MySQL + PHP) ½ü¼¸ÄêÀ´·¢Õ¹Ñ¸ËÙ£¬ÒѾ³ÉΪWeb ·þÎñÆ÷µÄÊÂʵ±ê×¼¡£LAMP
Õâ¸ö´ÊµÄÓÉÀ´×îÔçʼÓڵ¹úÔÓÖ¾“c't Magazine”£¬Michael KunzeÔÚ1990Äê×îÏÈ°ÑÕâЩÏîÄ¿×éºÏÔÚÒ»Æð´´ÔìÁËLAMPµÄËõд×Ö¡£ÕâЩ×é¼þËäÈ»²¢²»ÊÇ¿ª¿ªÊ¼¾ÍÉè¼ÆΪһÆðʹÓõģ¬µ«ÊÇ£¬ÕâЩ¿ªÔ´Èí¼þ¶¼¿ÉÒԺܷ½±ã µÄË ......