您现在的位置: 365建站网 > 建站教程 > PHP 教程 >

PHP 是一种创建动态交互性站点的强有力的服务器端脚本语言。

PHP 是免费的,并且使用广泛。对于像微软 ASP 这样的竞争者来说,PHP 无疑是另一种高效率的选项。

开始学习 PHP !

通过在线实例学习 PHP

我们的 “运行实例” 工具降低了 PHP 的学习难度,它可以同时显示出 PHP 源代码以及代码的 HTML 输出。

实例

<!DOCTYPE html>
<html>
<body>

<?php
echo "我的第一段 PHP 脚本!";
?>

</body>
</html>

运行实例

请点击“运行实例”,看看它是如何工作。

PHP 参考手册

在 365jz,我们为您提供包括所有 PHP 函数的完整参考手册:

PHP 5 测验

在 365jz 测试您的 PHP 技能!

开始 PHP 测验!


PHP 教程·教程目录

本教程全部小节

PHP 基础
1PHP 简介 2PHP 安装 3PHP 语法 4PHP 变量 5PHP 5 echo 和 print 语句 6PHP 数据类型 7PHP 字符串函数 8PHP 常量 9PHP 运算符 10PHP if...else...elseif 语句 11PHP Switch 语句 12PHP while 循环 13PHP for 循环 14PHP header() 函数 15PHP 函数 16PHP headers_list() 函数 17PHP 数组 18PHP headers_sent() 函数 19PHP 数组排序 20PHP setcookie() 函数 21PHP 全局变量 - 超全局变量 22PHP setrawcookie() 函数
PHP 表单
23PHP 表单处理 24PHP unlink() 函数 25PHP 表单验证 26PHP chdir() 函数 27PHP 表单验证 - 必填字段 28PHP chroot() 函数 29PHP 表单验证 - 验证 E-mail 和 URL 30PHP closedir() 函数 31PHP 表单验证 - 完成表单实例 32PHP dir() 函数
PHP 高级教程
33PHP 多维数组 34PHP getcwd() 函数 35PHP 日期和时间 36PHP opendir() 函数 37PHP Include 文件 38PHP readdir() 函数 39PHP 文件处理 40PHP rewinddir() 函数 41PHP 文件打开/读取/读取 42PHP scandir() 函数 43PHP 文件创建/写入 44PHP debug_backtrace() 函数 45PHP 文件上传 46PHP debug_print_backtrace() 函数 47PHP Cookies 48PHP error_get_last() 函数 49PHP Sessions 50PHP error_log() 函数 51PHP 发送电子邮件 52PHP error_reporting() 函数 53PHP 安全的电子邮件 54PHP restore_error_handler() 函数 55PHP 错误处理 56PHP restore_exception_handler() 函数 57PHP 异常处理 58PHP set_error_handler() 函数 59PHP 过滤器(Filter) 60PHP set_exception_handler() 函数
PHP 数据库
61PHP MySQL 简介 62PHP trigger_error() 函数 63PHP MySQL 连接数据库 64PHP checkdate() 函数 65PHP MySQL 创建数据库和表 66PHP date_add() 函数 67PHP MySQL Insert Into 68PHP date_create_from_format() 函数 69PHP MySQL Select 70PHP date_create() 函数 71PHP MySQL Where 子句 72PHP date_date_set() 函数 73PHP MySQL Order By 关键词 74PHP date_default_timezone_get() 函数 75PHP MySQL Update 76PHP date_default_timezone_set() 函数 77PHP MySQL Delete From 78PHP date_diff() 函数 79PHP Database ODBC 80PHP date_format() 函数
PHP XML
81PHP XML Expat 解析器 82PHP date_get_last_errors() 函数 83PHP XML DOM 84PHP date_interval_format() 函数 85PHP SimpleXML 86PHP date_isodate_set() 函数
PHP 和 AJAX
87AJAX 简介 88PHP date_modify() 函数 89AJAX XMLHttpRequest 90PHP date_offset_get() 函数 91PHP 和 AJAX 请求 92PHP date_parse_from_format() 函数 93PHP 和 AJAX XML 实例 94PHP date_parse() 函数 95PHP 和 AJAX MySQL 数据库实例 96PHP date_sub() 函数 97PHP 和 AJAX responseXML 实例 98PHP date_sun_info() 函数 99PHP 和 AJAX Live Search 100PHP date_sunrise() 函数 101PHP 和 AJAX RSS 阅读器 102PHP date_sunset() 函数 103PHP 和 AJAX 投票 104PHP date_time_set() 函数
PHP 参考手册
105PHP Array 函数 106PHP date_timestamp_get() 函数 107PHP Calendar 函数 108PHP date_timestamp_set() 函数 109PHP Date / Time 函数 110PHP date_timezone_get() 函数 111PHP Directory 函数 112PHP date_timezone_set() 函数 113PHP Error 和 Logging 函数 114PHP date() 函数 115PHP Filesystem 函数 116PHP getdate() 函数 117PHP Filter 函数 118PHP gettimeofday() 函数 119PHP FTP 函数 120PHP gmdate() 函数 121PHP HTTP 函数 122PHP gmmktime() 函数 123PHP libxml 函数 124PHP gmstrftime() 函数 125PHP Mail 函数 126PHP idate() 函数 127PHP Math 函数 128PHP localtime() 函数 129PHP MySQL 函数 130PHP microtime() 函数 131PHP 5 MySQLi 函数 132PHP mktime() 函数 133PHP SimpleXML 函数 134PHP strftime() 函数 135PHP 5 String 函数 136PHP strptime() 函数 137PHP XML Parser 函数 138PHP strtotime() 函数 139PHP Zip File 函数 140PHP time() 函数 141PHP 杂项函数 142PHP timezone_abbreviations_list() 函数 143PHP 时区 144PHP timezone_identifiers_list() 函数 145PHP 测验 146PHP timezone_location_get() 函数 147PHP 参考手册 148PHP timezone_name_from_abbr() 函数 149PHP timezone_name_get() 函数 150PHP timezone_offset_get() 函数 151PHP timezone_open() 函数 152PHP timezone_version_get() 函数 153PHP cal_days_in_month() 函数 154PHP cal_from_jd() 函数 155PHP cal_info() 函数 156PHP cal_to_jd() 函数 157PHP easter_date() 函数 158PHP easter_days() 函数 159PHP FrenchToJD() 函数 160PHP GregorianToJD() 函数 161PHP JDDayOfWeek() 函数 162PHP JDMonthName() 函数 163PHP JDToFrench() 函数 164PHP JDToGregorian() 函数 165PHP JDToJewish() 函数 166PHP JDToJulian() 函数 167PHP JDToUnix() 函数 168PHP JewishToJD() 函数 169PHP JulianToJD() 函数 170PHP UnixToJD() 函数 171PHP array() 172PHP array_change_key_case() 函数 173PHP array_chunk() 函数 174PHP array_column() 函数 175PHP array_combine() 函数 176PHP array_count_values() 函数 177PHP array_diff() 函数 178PHP array_diff_assoc() 函数 179PHP array_diff_key() 函数 180PHP array_diff_uassoc() 函数 181PHP array_diff_ukey() 函数 182PHP array_fill() 函数 183PHP array_fill_keys() 函数 184PHP array_filter() 函数 185PHP array_flip() 函数 186PHP array_intersect() 函数 187PHP array_intersect_assoc() 函数 188PHP array_intersect_key() 函数 189PHP array_intersect_uassoc() 函数 190PHP array_intersect_ukey() 函数 191PHP array_key_exists() 函数 192PHP array_keys() 函数 193PHP array_map() 函数 194PHP array_merge() 函数 195PHP array_merge_recursive() 函数 196PHP array_multisort() 函数 197PHP array_pad() 函数 198PHP array_pop() 函数 199PHP array_product() 函数 200PHP array_push() 函数 201PHP array_rand() 函数 202PHP array_reduce() 函数 203PHP array_replace() 函数 204PHP array_replace_recursive() 函数 205PHP array_reverse() 函数 206PHP array_search() 函数 207PHP array_shift() 函数 208PHP array_slice() 函数 209PHP array_splice() 函数 210PHP array_sum() 函数 211PHP array_udiff() 函数 212PHP array_udiff_assoc() 函数 213PHP array_udiff_uassoc() 函数 214PHP array_uintersect() 函数 215PHP array_uintersect_assoc() 函数 216PHP array_uintersect_uassoc() 函数 217PHP array_unique() 函数 218PHP array_unshift() 函数 219PHP array_values() 函数 220PHP array_walk() 函数 221PHP array_walk_recursive() 函数 222PHP arsort() 函数 223PHP asort() 函数 224PHP compact() 函数 225PHP count() 函数 226PHP current() 函数 227PHP each() 函数 228PHP end() 函数 229PHP extract() 函数 230PHP in_array() 函数 231PHP key() 函数 232PHP krsort() 函数 233PHP ksort() 函数 234PHP list() 函数 235PHP natcasesort() 函数 236PHP natsort() 函数 237PHP next() 函数 238PHP pos() 函数 239PHP prev() 函数 240PHP range() 函数 241PHP reset() 函数 242PHP rsort() 函数 243PHP shuffle() 函数 244PHP sizeof() 函数 245PHP sort() 函数 246PHP uasort() 函数 247PHP uksort() 函数 248PHP usort() 函数 249PHP setlocale() 函数 250PHP zip_close() 函数 251PHP zip_entry_close() 函数 252PHP zip_entry_compressedsize() 函数 253PHP zip_entry_compressionmethod() 函数 254PHP zip_entry_filesize() 函数 255PHP zip_entry_name() 函数 256PHP zip_entry_open() 函数 257PHP zip_entry_read() 函数 258PHP zip_open() 函数 259PHP zip_read() 函数 260PHP connection_aborted() 函数 261PHP connection_status() 函数 262PHP constant() 函数 263PHP define() 函数 264PHP defined() 函数 265PHP die() 函数 266PHP eval() 函数 267PHP exit() 函数 268PHP get_browser() 函数 269PHP highlight_file() 函数 270PHP highlight_string() 函数 271PHP ignore_user_abort() 函数 272PHP pack() 函数 273PHP strip_whitespace() 函数 274PHP show_source() 函数 275PHP sleep() 函数 276PHP time_nanosleep() 函数 277PHP time_sleep_until() 函数 278PHP uniqid() 函数 279PHP unpack() 函数 280PHP usleep() 函数 281PHP utf8_decode() 函数 282PHP utf8_encode() 函数 283PHP xml_error_string() 函数 284PHP xml_get_current_byte_index() 函数 285PHP xml_get_current_column_number() 函数 286PHP xml_get_current_line_number() 函数 287PHP xml_get_error_code() 函数 288PHP xml_parse() 函数 289PHP xml_parse_into_struct() 函数 290PHP xml_parser_create_ns() 函数 291PHP xml_parser_create() 函数 292PHP xml_parser_free() 函数 293PHP xml_parser_get_option() 函数 294PHP xml_parser_set_option() 函数 295PHP xml_set_character_data_handler() 函数 296PHP xml_set_default_handler() 函数 297PHP xml_set_element_handler() 函数 298PHP xml_set_external_entity_ref_handler() 函数 299PHP xml_set_notation_decl_handler() 函数 300PHP xml_set_object() 函数 301PHP xml_set_processing_instruction_handler() 函数 302PHP xml_set_unparsed_entity_decl_handler() 函数 303PHP addcslashes() 函数 304PHP addslashes() 函数 305PHP bin2hex() 函数 306PHP chop() 函数 307PHP chr() 函数 308PHP chunk_split() 函数 309PHP convert_cyr_string() 函数 310PHP convert_uudecode() 函数 311PHP convert_uuencode() 函数 312PHP count_chars() 函数 313PHP crc32() 函数 314PHP crypt() 函数 315PHP echo() 函数 316PHP explode() 函数 317PHP fprintf() 函数 318PHP get_html_translation_table() 函数 319PHP hebrev() 函数 320PHP hebrevc() 函数 321PHP hex2bin() 函数 322PHP html_entity_decode() 函数 323PHP htmlentities() 函数 324PHP html_entity_decode() 函数 325PHP htmlspecialchars() 函数 326PHP implode() 函数 327PHP join() 函数 328PHP lcfirst() 函数 329PHP levenshtein() 函数 330PHP localeconv() 函数 331PHP ltrim() 函数 332PHP md5() 函数 333PHP md5_file() 函数 334PHP metaphone() 函数 335PHP money_format() 函数 336PHP nl_langinfo() 函数 337PHP nl2br() 函数 338PHP number_format() 函数 339PHP ord() 函数 340PHP parse_str() 函数 341PHP print() 函数 342PHP printf() 函数 343PHP quoted_printable_decode() 函数 344PHP quoted_printable_encode() 函数 345PHP quotemeta() 函数 346PHP rtrim() 函数 347PHP sha1() 函数 348PHP sha1_file() 函数 349PHP similar_text() 函数 350PHP soundex() 函数 351PHP sprintf() 函数 352PHP sscanf() 函数 353PHP str_getcsv() 函数 354PHP str_ireplace() 函数 355PHP str_pad() 函数 356PHP str_repeat() 函数 357PHP str_replace() 函数 358PHP str_rot13() 函数 359PHP str_shuffle() 函数 360PHP str_split() 函数 361PHP str_word_count() 函数 362PHP strcasecmp() 函数 363PHP strchr() 函数 364PHP strcmp() 函数 365PHP strcoll() 函数 366PHP strcspn() 函数 367PHP strip_tags() 函数 368PHP stripcslashes() 函数 369PHP stripslashes() 函数 370PHP stripos() 函数 371PHP stristr() 函数 372PHP strlen() 函数 373PHP strnatcasecmp() 函数 374PHP strnatcmp() 函数 375PHP strncasecmp() 函数 376PHP strncmp() 函数 377PHP strpbrk() 函数 378PHP strpos() 函数 379PHP strrchr() 函数 380PHP strrev() 函数 381PHP strripos() 函数 382PHP strrpos() 函数 383PHP strspn() 函数 384PHP strstr() 函数 385PHP strtok() 函数 386PHP strtolower() 函数 387PHP strtoupper() 函数 388PHP strtr() 函数 389PHP substr() 函数 390PHP substr_compare() 函数 391PHP substr_count() 函数 392PHP substr_replace() 函数 393PHP trim() 函数 394PHP ucfirst() 函数 395PHP ucwords() 函数 396PHP vfprintf() 函数 397PHP vprintf() 函数 398PHP vsprintf() 函数 399PHP wordwrap() 函数 400PHP __construct() 函数 401PHP addAttribute() 函数 402PHP addChild() 函数 403PHP asXML() 函数 404PHP attributes() 函数 405PHP children() 函数 406PHP getDocNamespaces() 函数 407PHP getName() 函数 408PHP getNamespace() 函数 409PHP registerXPathNamespace() 函数 410PHP simplexml_import_dom() 函数 411PHP simplexml_load_file() 函数 412PHP simplexml_load_string() 函数 413PHP xpath() 函数 414PHP mysql_affected_rows() 函数 415PHP mysql_client_encoding() 函数 416PHP mysql_close() 函数 417PHP mysql_connect() 函数 418PHP mysql_data_seek() 函数 419PHP mysql_db_name() 函数 420PHP mysql_errno() 函数 421PHP mysql_error() 函数 422PHP mysql_fetch_array() 函数 423PHP mysql_fetch_assoc() 函数 424PHP mysql_fetch_field() 函数 425PHP mysql_fetch_lengths() 函数 426PHP mysql_fetch_object() 函数 427PHP mysql_fetch_row() 函数 428PHP mysql_field_flags() 函数 429PHP mysql_field_len() 函数 430PHP mysql_field_name() 函数 431PHP mysql_field_seek() 函数 432PHP mysql_field_table() 函数 433PHP mysql_field_type() 函数 434PHP mysql_free_result() 函数 435PHP mysql_get_client_info() 函数 436PHP mysql_get_host_info() 函数 437PHP mysql_get_proto_info() 函数 438PHP mysql_get_server_info() 函数 439PHP mysql_info() 函数 440PHP mysql_insert_id() 函数 441PHP mysql_list_dbs() 函数 442PHP mysql_list_processes() 函数 443PHP mysql_num_fields() 函数 444PHP mysql_num_rows() 函数 445PHP mysql_pconnect() 函数 446PHP mysql_ping() 函数 447PHP mysql_query() 函数 448PHP mysql_real_escape_string() 函数 449PHP mysql_result() 函数 450PHP mysql_select_db() 函数 451PHP mysql_stat() 函数 452PHP mysql_thread_id() 函数 453PHP mysql_unbuffered_query() 函数 454PHP mail() 函数 455PHP abs() 函数 456PHP acos() 函数 457PHP acosh() 函数 458PHP asin() 函数 459PHP asinh() 函数 460PHP atan() 和 atan2() 函数 461PHP atanh() 函数 462PHP base_convert() 函数 463PHP bindec() 函数 464PHP ceil() 函数 465PHP cos() 函数 466PHP cosh() 函数 467PHP decbin() 函数 468PHP dechex() 函数 469PHP decoct() 函数 470PHP deg2rad() 函数 471PHP exp() 函数 472PHP expm1() 函数 473PHP floor() 函数 474PHP fmod() 函数 475PHP getrandmax() 函数 476PHP hexdec() 函数 477PHP hypot() 函数 478PHP is_finite() 函数 479PHP is_infinite() 函数 480PHP is_nan() 函数 481PHP lcg_value() 函数 482PHP log() 函数 483PHP log10() 函数 484PHP log1p() 函数 485PHP max() 函数 486PHP min() 函数 487PHP mt_getrandmax() 函数 488PHP mt_rand() 函数 489PHP mt_srand() 函数 490PHP octdec() 函数 491PHP pi() 函数 492PHP pow() 函数 493PHP rad2deg() 函数 494PHP rand() 函数 495PHP round() 函数 496PHP sin() 函数 497PHP sinh() 函数 498PHP sqrt() 函数 499PHP srand() 函数 500PHP tan() 函数