1)func_get_args():--returns an array comprising a function's argument list
//返回一個由函數參數組成的數組
description
//描述
array func_get_args( void )
returns an array in which each element is the correspoonding member of the current user-defined function's argument list.
//返回一個數組,其每個元素對應當前用戶所定義的函數的的參數列
<?php
function foo(){
$numargs = func_num_args ();
echo "Number of arguments: $numargs<br />/n";
if ($numargs >= 2 ){
echo "Second argument is :" . func_get_arg(1) . "<br />/n";
}
$arg_list = func_get_args();
for( ($i =0; $i < $numargs; $i++){
echo "Argument $i is: " . $arg_list[$i]. "<br />/n";
}
}
foo(1,2,3);
?>
2)array_slice( void );
該函數跟字符串截取函數substr類似,只是對象是數組,通過該函數可以截取數組的某一段區間;
3)is_resource($string)
用來判斷傳入參數是否爲資源;
<?php
$m_sql = "select * from tb where 1<2";
$m_quy = mysql_query($m_sql);
if(is_resource($m_quy)){
print "true";
}
?>
4)mysql_unbuffered_query()
不通過緩存直接輸出結果
注意點:
1)在獲取結果後,需要馬上就提取所有結果集;否則當執行下一條的mysql_unbuffered_query()後,前面的結果將被覆蓋;
2)該函數使用後,不能通過mysql_num_rows()和mysql_data_seek()來提取結果