PHP慣用函數

來源:互聯網
上載者:User
PHP常用函數
數組函數
array_chunk //將一個數組分割成多個數組
array_key_exists //檢查給定的鍵名或索引是否存在於數組中
array_keys //返回數組中所有的鍵名,並形成新的數組
array_merge //合并一個或多個數組,重建索引
array_values //返回數組中所有的值,形成新的數組(數字索引)
array //建立一個數組
arsort //對數組進行逆向排序並保持索引關係
asort //對數組進行排序並保持索引關係
count //計算數組中的單元數目或對象中的屬性個數
each //返回數組中當前的鍵/值,並將數組指標向前移動一步
end //將數組的內部指標指向最後一個單元
extract //從數組中將變數匯入到當前的符號表(其鍵名作為變數的名,索引值作為變數的值)
in_array //檢查數組中是否存在某個值
key //從關聯陣列中取得鍵名
krsort //對數組按照鍵名逆向排序
ksort //對數組按照鍵名排序
list //把數組中的值賦給一些變數,
next //將數組中的內部指標向前移動一位
current //返回數組當前單元
reset //將數組的內部指標指向第一個單元
sort //對數組排序---SORT_REGULAR - 正常比較單元(不改變類型),SORT_NUMERIC - 單元被作為數字來比較,單元被作為字串來比較,根據當前的地區(locale)設定來把單元當作字串比較
時間日期行數


date
gmdate
gmmktime
microtime
time

檔案系統函數
basename
chmod
copy
delete/unlink
dirname
fopen/flock/fread/fwrite/fclose
file_exists
file_get_contents
file_put_contents
file
fileatime
filemtime
filesize
ftruncate
is_dir
is_file
is_readable
is_uploaded_file
is_writable
mkdir
move_uploaded_file
rename
rmdir
touch
unlink

數學函數
abs
ceil
floor
max
min


Mysql函數
mysql_connect/mysql_pconnect
mysql_error
mysql_errno
mysql_fetch_array
mysql_fetch_field
mysql_fetch_row
mysql_insert_id
mysql_query

字串處理函數
addslashes
echo
explode
join
md5
print
//sprintf
str_replace
strstr
strip_tags
stripslashes
strlen
strpos
strtolower
strtouper
substr
trim

URL函數庫
base64_decode
base64_encode
rawurldecode
rawurlencode
urldecode
urlencode

變數函數
empty
floatval
get_defined_vars
gettype
intval
is_array
is_bool
is_float
is_int
is_null
is_numeric
is_object
is_resource
is_string
isset
print_r
settype
strval
unset
var_dump

php.ini
short_open_tag on
asp_tags off
disable_functions
display_errors on
track_errors on
register_globals off
post_max_size
extension_dir = "./ext"
enable_dl off

extension=php_gd2.dll
extension=php_mbstring.dll
extension=php_mysql.dll
轉載自:http://hi.baidu.com/xixer/blog/item/7d320b94f24d2d18d21b70c7.html
  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.