|
|
FREE DOWNLOAD THIS TUTORIAL
Tutorial in pdf format so you can save it to your PC, e-book reader or print.
Sponsored link
Note: The tutorial you are about to download is compressed format. Rar, if you do not have a decompressor rar files you can download 7-zip and you can display the Foxit PDF Reader.
|
|
Preface About this Manual I. Getting Started 1. Introduction What is PHP? What can PHP do? A brief history of PHP 2. Installation Downloading the latest version Installation on UNIX systems Quick Installation Instructions (Apache Module Version) Configuration Apache module fhttpd module CGI version Database Support Options Adabas D dBase filePro mSQL MySQL iODBC OpenLink ODBC Oracle PostgreSQL Solid Sybase Sybase-CT Velocis A custom ODBC library Unified ODBC LDAP Other configure options –with-mcrypt=DIR –enable-sysvsem –enable-sysvshm –with-xml –enable-maintainer-mode –with-system-regex –with-config-file-path –with-exec-dir –enable-debug –enable-safe-mode –enable-track-vars –enable-magic-quotes –enable-debugger –enable-discard-path –enable-bcmath –enable-force-cgi-redirect –disable-short-tags –enable-url-includes –disable-syntax-hl CPPFLAGS and LDFLAGS Building Testing Benchmarking Installation on Windows 95/98/NT systems General Installation Steps Windows 95/98/NT and PWS/IIS 3 Windows NT and IIS 4 Windows 9x/NT and Apache 1.3.x Omni HTTPd 2.0b1 for Windows PHP Modules Problems? Read the FAQ Bug reports Other problems 3. Configuration The configuration file General Configuration Directives Mail Configuration Directives Safe Mode Configuration Directives Debugger Configuration Directives Extension Loading Directives MySQL Configuration Directives mSQL Configuration Directives Postgres Configuration Directives Sybase Configuration Directives Sybase-CT Configuration Directives Informix Configuration Directives BC Math Configuration Directives Browser Capability Configuration Directives Unified ODBC Configuration Directives 4. Security CGI binary Possible attacks Case 1: only public files served Case 2: using –enable-force-cgi-redirect Case 3: setting doc_root or user_dir Case 4: PHP parser outside of web tree Apache module II. Language Reference 5. Basic syntax Escaping from HTML Instruction separation Comments 6. Types Integers Floating point numbers Strings String conversion Arrays Single Dimension Arrays Multi-Dimensional Arrays Objects Object Initialization Type Juggling Type Casting 7. Variables Basics Predefined variables Apache variables Environment variables PHP variables Variable scope Variable variables Variables from outside PHP HTML Forms (GET and POST) IMAGE SUBMIT variable names HTTP Cookies Environment variables Dots in incoming variable names Determining variable types 8. Constants 9. Expressions 10. Operators Arithmetic Operators Assignment Operators Bitwise Operators Comparison Operators Error control Operators Execution Operators Incrementing/Decrementing Operators Logical Operators Operator Precedence String Operators 11. Control Structures if else elseif Alternative syntax for control structures while do..while for foreach break continue switch require() include() 12. Functions User-defined functions Function arguments Making arguments be passed by reference Default argument values Variable-length argument lists Returning values old_function Variable functions 13. Classes and Objects class III. Features 14. Error handling 15. Creating GIF images 16. HTTP authentication with PHP 17. Cookies 18. Handling file uploads POST method uploads Common Pitfalls Uploading multiple files PUT method support 19. Using remote files 20. Connection handling 21. Persistent database connections IV. Function Reference I. Apache-specific Functions apache_lookup_uri apache_note getallheaders virtual II. Arbitrary precision mathematics functions bcadd bccomp bcdiv bcmod bcmul bcpow bcscale bcsqrt bcsub III. Array functions array array_count_values array_flip array_keys array_merge array_pad array_pop array_push array_reverse array_shift array_slice array_splice array_unshift array_values array_walk arsort asort compact count current each end extract in_array key krsort ksort list next pos prev range reset rsort shuffle sizeof sort uasort uksort usort IV. Aspell functions aspell_new aspell_check aspell_check-raw aspell_suggest V. Calendar functions JDToGregorian GregorianToJD JDToJulian JulianToJD JDToJewish JewishToJD JDToFrench FrenchToJD JDMonthName JDDayOfWeek easter_date easter_days unixtojd jdtounix VI. COM support functions for Windows com_load com_invoke com_propget com_get com_propput com_propset com_set VII. Class/Object Functions get_class_methods get_class_vars get_object_vars method_exists VIII. ClibPDF functions cpdf_global_set_document_limits cpdf_set_creator cpdf_set_title cpdf_set_subject cpdf_set_keywords cpdf_open cpdf_close cpdf_page_init cpdf_finalize_page cpdf_finalize cpdf_output_buffer cpdf_save_to_file cpdf_set_current_page cpdf_begin_text cpdf_end_text cpdf_show cpdf_show_xy cpdf_text cpdf_set_font cpdf_set_leading cpdf_set_text_rendering cpdf_set_horiz_scaling cpdf_set_text_rise cpdf_set_text_matrix cpdf_set_text_pos cpdf_set_char_spacing cpdf_set_word_spacing cpdf_continue_text cpdf_stringwidth cpdf_save cpdf_restore cpdf_translate cpdf_scale cpdf_rotate cpdf_setflat cpdf_setlinejoin cpdf_setlinecap cpdf_setmiterlimit cpdf_setlinewidth cpdf_setdash cpdf_moveto cpdf_rmoveto cpdf_curveto cpdf_lineto cpdf_rlineto cpdf_circle cpdf_arc cpdf_rect cpdf_closepath cpdf_stroke cpdf_closepath_stroke cpdf_fill cpdf_fill_stroke cpdf_closepath_fill_stroke cpdf_clip cpdf_setgray_fill cpdf_setgray_stroke cpdf_setgray cpdf_setrgbcolor_fill cpdf_setrgbcolor_stroke cpdf_setrgbcolor cpdf_add_outline cpdf_set_page_animation cpdf_import_jpeg cpdf_place_inline_image cpdf_add_annotation IX. Cybercash payment functions cybercash_encr cybercash_decr cybercash_base64_encode cybercash_base64_decode X. DOM XML functions xmldoc xmldocfile xmltree XI. Compression functions gzclose gzeof gzfile gzgetc gzgets gzgetss gzopen gzpassthru gzputs gzread gzrewind gzseek gztell gzwrite readgzfile XII. Database (dbm-style) abstraction layer functions dba_close dba_delete dba_exists dba_fetch dba_firstkey dba_insert dba_nextkey dba_popen dba_open dba_optimize dba_replace dba_sync XIII. Date and Time functions checkdate date getdate gettimeofday gmdate gmmktime gmstrftime localtime microtime mktime strftime time strtotime XIV. dBase functions dbase_create dbase_open dbase_close dbase_pack dbase_add_record dbase_replace_record dbase_delete_record dbase_get_record dbase_get_record_with_names dbase_numfields dbase_numrecords XV. dbm functions dbmopen dbmclose dbmexists dbmfetch dbminsert dbmreplace dbmdelete dbmfirstkey dbmnextkey dblist XVI. Directory functions chdir dir closedir opendir readdir rewinddir XVII. Dynamic Loading functions dl XVIII. Encryption functions mcrypt_get_cipher_name mcrypt_get_block_size mcrypt_get_key_size mcrypt_create_iv mcrypt_cbc mcrypt_cfb mcrypt_ecb mcrypt_ofb XIX. filePro functions filepro filepro_fieldname filepro_fieldtype filepro_fieldwidth filepro_retrieve filepro_fieldcount filepro_rowcount XX. Filesystem functions basename chgrp chmod chown clearstatcache copy delete dirname diskfreespace fclose feof fgetc fgetcsv fgets fgetss file file_exists fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype flock fopen fpassthru fputs fread fseek ftell ftruncate fwrite set_file_buffer is_dir is_executable is_file is_link is_readable is_writeable link linkinfo mkdir pclose popen readfile readlink rename rewind rmdir stat lstat symlink tempnam touch umask unlink XXI. Forms Data Format functions fdf_open fdf_close fdf_create fdf_save fdf_get_value fdf_set_value fdf_next_field_name fdf_set_ap fdf_set_status fdf_get_status fdf_set_file fdf_get_file XXII. FTP functions ftp_connect ftp_login ftp_pwd ftp_cdup ftp_chdir ftp_mkdir ftp_rmdir ftp_nlist ftp_rawlist ftp_systype ftp_pasv ftp_get ftp_fget ftp_put ftp_fput ftp_size ftp_mdtm ftp_rename ftp_delete ftp_site ftp_quit XXIII. GNU Gettext bindtextdomain dcgettext dgettext gettext textdomain XXIV. Hash functions mhash_get_hash_name mhash_get_block_size mhash_count mhash XXV. HTTP functions header setcookie XXVI. Hyperwave functions hw_Array2Objrec hw_Children hw_ChildrenObj hw_Close hw_Connect hw_Cp hw_Deleteobject hw_DocByAnchor hw_DocByAnchorObj hw_DocumentAttributes hw_DocumentBodyTag hw_DocumentContent hw_DocumentSetContent hw_DocumentSize hw_ErrorMsg hw_EditText hw_Error hw_Free_Document hw_GetParents hw_GetParentsObj hw_GetChildColl hw_GetChildCollObj hw_GetRemote hw_GetRemoteChildren hw_GetSrcByDestObj hw_GetObject hw_GetAndLock hw_GetText hw_GetObjectByQuery hw_GetObjectByQueryObj hw_GetObjectByQueryColl hw_GetObjectByQueryCollObj hw_GetChildDocColl hw_GetChildDocCollObj hw_GetAnchors hw_GetAnchorsObj hw_Mv hw_Identify hw_InCollections hw_Info hw_InsColl hw_InsDoc hw_InsertDocument hw_InsertObject hw_mapid hw_Modifyobject hw_New_Document hw_Objrec2Array hw_OutputDocument hw_pConnect hw_PipeDocument hw_Root hw_Unlock hw_Who hw_Username XXVII. Image functions GetImageSize ImageArc ImageChar ImageCharUp ImageColorAllocate ImageColorAt ImageColorClosest ImageColorExact ImageColorResolve ImageColorSet ImageColorsForIndex ImageColorsTotal ImageColorTransparent ImageCopyResized ImageCreate ImageCreateFromGif ImageCreateFromJPEG ImageCreateFromPNG ImageDashedLine ImageDestroy ImageFill ImageFilledPolygon ImageFilledRectangle ImageFillToBorder ImageFontHeight ImageFontWidth ImageGIF ImageJPEG ImageInterlace ImageLine ImageLoadFont ImagePolygon ImagePSBBox ImagePSEncodeFont ImagePSFreeFont ImagePSLoadFont ImagePSText ImageRectangle ImageSetPixel ImageString ImageStringUp ImageSX ImageSY ImageTTFBBox ImageTTFText XXVIII. IMAP, POP3 and NNTP functions imap_append imap_base64 imap_body imap_check imap_close imap_createmailbox imap_delete imap_deletemailbox imap_expunge imap_fetchbody imap_fetchstructure imap_header imap_rfc822_parse_headers imap_headers imap_listmailbox imap_getmailboxes imap_listsubscribed imap_getsubscribed imap_mail_copy imap_mail_move imap_num_msg imap_num_recent imap_open imap_ping imap_renamemailbox imap_reopen imap_subscribe imap_undelete imap_unsubscribe imap_qprint imap_8bit imap_binary imap_scanmailbox imap_mailboxmsginfo imap_rfc822_write_address imap_rfc822_parse_adrlist imap_setflag_full imap_clearflag_full imap_sort imap_fetchheader imap_uid imap_msgno imap_search imap_last_error imap_errors imap_alerts imap_status imap_utf7_decode imap_utf7_encode imap_utf8 imap_fetch_overview imap_mail_compose imap_mail XXIX. Informix functions ifx_connect ifx_pconnect ifx_close ifx_query ifx_prepare ifx_do ifx_error ifx_errormsg ifx_affected_rows ifx_getsqlca ifx_fetch_row ifx_htmltbl_result ifx_fieldtypes ifx_fieldproperties ifx_num_fields ifx_num_rows ifx_free_result ifx_create_char ifx_free_char ifx_update_char ifx_get_char ifx_create_blob ifx_copy_blob ifx_free_blob ifx_get_blob ifx_update_blob ifx_blobinfile_mode ifx_textasvarchar ifx_byteasvarchar ifx_nullformat ifxus_create_slob ifx_free_slob ifxus_close_slob ifxus_open_slob ifxus_tell_slob ifxus_seek_slob ifxus_read_slob ifxus_write_slob XXX. InterBase functions ibase_connect ibase_pconnect ibase_close ibase_query ibase_fetch_row ibase_fetch_object ibase_free_result ibase_prepare ibase_execute ibase_free_query ibase_timefmt ibase_num_fields XXXI. LDAP functions ldap_add ldap_mod_add ldap_mod_del ldap_mod_replace ldap_bind ldap_close ldap_connect ldap_count_entries ldap_delete ldap_dn2ufn ldap_explode_dn ldap_first_attribute ldap_first_entry ldap_free_result ldap_get_attributes ldap_get_dn ldap_get_entries ldap_get_values ldap_get_values_len ldap_list ldap_modify ldap_next_attribute ldap_next_entry ldap_read ldap_search ldap_unbind ldap_err2str ldap_errno ldap_error XXXII. Mail functions mail XXXIII. Mathematical functions Abs Acos Asin Atan Atan2 base_convert BinDec Ceil Cos DecBin DecHex DecOct deg2rad Exp Floor getrandmax HexDec Log Log10 max min mt_rand mt_srand mt_getrandmax number_format OctDec pi pow rad2deg rand round Sin Sqrt srand Tan XXXIV. MCAL functions mcal_open mcal_close mcal_fetch_event mcal_list_events mcal_append_event mcal_store_event mcal_delete_event mcal_snooze mcal_list_alarms mcal_event_init mcal_event_set_category mcal_event_set_title mcal_event_set_description mcal_event_set_start mcal_event_set_end mcal_event_set_alarm mcal_event_set_class mcal_is_leap_year mcal_days_in_month mcal_date_valid mcal_time_valid mcal_day_of_week mcal_day_of_year mcal_date_compare mcal_next_recurrence mcal_event_set_recur_none mcal_event_set_recur_daily mcal_event_set_recur_weekly mcal_event_set_recur_monthly_mday mcal_event_set_recur_monthly_wday mcal_event_set_recur_yearly mcal_fetch_current_stream_event XXXV. Microsoft SQL Server functions mssql_close mssql_connect mssql_data_seek mssql_fetch_array mssql_fetch_field mssql_fetch_object mssql_fetch_row mssql_field_length mssql_field_name mssql_field_seek mssql_field_type mssql_free_result mssql_get_last_message mssql_min_error_severity mssql_min_message_severity mssql_num_fields mssql_num_rows mssql_pconnect mssql_query mssql_result mssql_select_db XXXVI. Miscellaneous functions connection_aborted connection_status connection_timeout define defined die eval exit func_get_arg func_get_args func_num_args function_exists get_browser ignore_user_abort iptcparse leak pack register_shutdown_function serialize sleep uniqid unpack unserialize usleep XXXVII. mSQL functions msql msql_affected_rows msql_close msql_connect msql_create_db msql_createdb msql_data_seek msql_dbname msql_drop_db msql_dropdb msql_error msql_fetch_array msql_fetch_field msql_fetch_object msql_fetch_row msql_fieldname msql_field_seek msql_fieldtable msql_fieldtype msql_fieldflags msql_fieldlen msql_free_result msql_freeresult msql_list_fields msql_listfields msql_list_dbs msql_listdbs msql_list_tables msql_listtables msql_num_fields msql_num_rows msql_numfields msql_numrows msql_pconnect msql_query msql_regcase msql_result msql_select_db msql_selectdb msql_tablename XXXVIII. MySQL functions mysql_affected_rows mysql_change_user mysql_close mysql_connect mysql_create_db mysql_data_seek mysql_db_query mysql_drop_db mysql_errno mysql_error mysql_fetch_array mysql_fetch_field mysql_fetch_lengths mysql_fetch_object mysql_fetch_row mysql_field_name mysql_field_seek mysql_field_table mysql_field_type mysql_field_flags mysql_field_len mysql_free_result mysql_insert_id mysql_list_fields mysql_list_dbs mysql_list_tables mysql_num_fields mysql_num_rows mysql_pconnect mysql_query mysql_result mysql_select_db mysql_tablename XXXIX. Network Functions checkdnsrr closelog debugger_off debugger_on fsockopen gethostbyaddr gethostbyname gethostbynamel getmxrr getprotobyname getprotobynumber getservbyname getservbyport openlog pfsockopen set_socket_blocking syslog XL. NIS functions yp_get_default_domain yp_order yp_master yp_match yp_first yp_next XLI. ODBC functions odbc_autocommit odbc_binmode odbc_close odbc_close_all odbc_commit odbc_connect odbc_cursor odbc_do odbc_exec odbc_execute odbc_fetch_into odbc_fetch_row odbc_field_name odbc_field_type odbc_field_len odbc_free_result odbc_longreadlen odbc_num_fields odbc_pconnect odbc_prepare odbc_num_rows odbc_result odbc_result_all odbc_rollback odbc_setoption XLII. Oracle functions Ora_Bind Ora_Close Ora_ColumnName Ora_ColumnType Ora_Commit Ora_CommitOff Ora_CommitOn Ora_Error Ora_ErrorCode Ora_Exec Ora_Fetch Ora_GetColumn Ora_Logoff Ora_Logon Ora_Open Ora_Parse Ora_Rollback XLIII. Oracle 8 functions OCIDefineByName OCIBindByName OCILogon OCIPLogon OCINLogon OCILogOff OCIExecute OCICommit OCIRollback OCINewDescriptor OCIRowCount OCINumCols OCIResult OCIFetch OCIFetchInto OCIFetchStatement OCIColumnIsNULL OCIColumnSize OCIServerVersion OCIStatementType OCINewCursor OCIFreeStatement OCIFreeCursor OCIColumnName OCIColumnType OCIParse OCIError OCIInternalDebug XLIV. PDF functions PDF_get_info PDF_set_info_creator PDF_set_info_title PDF_set_info_subject PDF_set_info_keywords PDF_set_info_author PDF_open PDF_close PDF_begin_page PDF_end_page PDF_show PDF_show_boxed PDF_show_xy PDF_set_font PDF_set_leading PDF_set_parameter PDF_set_text_rendering PDF_set_horiz_scaling PDF_set_text_rise PDF_set_text_matrix PDF_set_text_pos PDF_set_char_spacing PDF_set_word_spacing PDF_skew PDF_continue_text PDF_stringwidth PDF_save PDF_restore PDF_translate PDF_scale PDF_rotate PDF_setflat PDF_setlinejoin PDF_setlinecap PDF_setmiterlimit PDF_setlinewidth PDF_setdash PDF_moveto PDF_curveto PDF_lineto PDF_circle PDF_arc PDF_rect PDF_closepath PDF_stroke PDF_closepath_stroke PDF_fill PDF_fill_stroke PDF_closepath_fill_stroke PDF_endpath PDF_clip PDF_setgray_fill PDF_setgray_stroke PDF_setgray PDF_setrgbcolor_fill PDF_setrgbcolor_stroke PDF_setrgbcolor PDF_add_outline PDF_set_transition PDF_set_duration PDF_open_gif PDF_open_memory_image PDF_open_jpeg PDF_close_image PDF_place_image PDF_put_image PDF_execute_image pdf_add_annotation XLV. Perl-compatible Regular Expression functions preg_match preg_match_all preg_replace preg_split preg_quote preg_grep Pattern Modifiers Pattern Syntax XLVI. PHP options & information error_log error_reporting extension_loaded getenv get_cfg_var get_current_user get_magic_quotes_gpc get_magic_quotes_runtime getlastmod getmyinode getmypid getmyuid getrusage phpinfo phpversion php_logo_guid putenv set_magic_quotes_runtime set_time_limit zend_logo_guid XLVII. POSIX functions posix_kill posix_getpid posix_getppid posix_getuid posix_geteuid posix_getgid posix_getegid posix_setuid posix_setgid posix_getgroups posix_getlogin posix_getpgrp posix_setsid posix_setpgid posix_getpgid posix_getsid posix_uname posix_times posix_ctermid posix_ttyname posix_isatty posix_getcwd posix_mkfifo posix_getgrnam posix_getgrgid posix_getpwnam posix_getpwuid posix_getrlimit XLVIII. PostgreSQL functions pg_Close pg_cmdTuples pg_Connect pg_DBname pg_ErrorMessage pg_Exec pg_Fetch_Array pg_Fetch_Object pg_Fetch_Row pg_FieldIsNull pg_FieldName pg_FieldNum pg_FieldPrtLen pg_FieldSize pg_FieldType pg_FreeResult pg_GetLastOid pg_Host pg_loclose pg_locreate pg_loopen pg_loread pg_loreadall pg_lounlink pg_lowrite pg_NumFields pg_NumRows pg_Options pg_pConnect pg_Port pg_Result pg_tty XLIX. Program Execution functions escapeshellcmd exec passthru system L. GNU Recode functions recode_string recode recode_file LI. Regular expression functions ereg ereg_replace eregi eregi_replace split sql_regcase LII. Semaphore and Shared Memory Functions sem_get sem_acquire sem_release shm_attach shm_detach shm_remove shm_put_var shm_get_var shm_remove_var LIII. Session handling functions session_start session_destroy session_name session_module_name session_save_path session_id session_register session_unregister session_is_registered session_decode session_encode LIV. SNMP functions snmpget snmpset snmpwalk snmpwalkoid snmp_get_quick_print snmp_set_quick_print LV. String functions AddCSlashes AddSlashes bin2hex Chop Chr chunk_split convert_cyr_string count_chars crypt echo explode flush get_html_translation_table get_meta_tags htmlentities htmlspecialchars implode join ltrim ltrim md5 Metaphone nl2br Ord parse_str print printf quoted_printable_decode QuoteMeta rawurldecode rawurlencode setlocale similar_text soundex sprintf strcasecmp strchr strcmp strcspn strip_tags StripCSlashes StripSlashes stristr strlen strpos strrchr str_repeat strrev strrpos strspn strstr strtok strtolower strtoupper str_replace strtr substr substr_replace trim ucfirst ucwords LVI. Shockwave Flash functions swf_openfile swf_closefile swf_labelframe swf_showframe swf_setframe swf_getframe swf_mulcolor swf_addcolor swf_placeobject swf_modifyobject swf_removeobject swf_nextid swf_startdoaction swf_actiongotoframe swf_actiongeturl swf_actionnextframe swf_actionprevframe swf_actionplay swf_actionstop swf_actiontogglequality swf_actionwaitforframe swf_actionsettarget swf_actiongotolabel swf_enddoaction swf_defineline swf_definerect swf_definepoly swf_startshape swf_shapelinesolid swf_shapefilloff swf_shapefillsolid swf_shapefillbitmaptile swf_shapefillbitmaptile swf_shapemoveto swf_shapelineto swf_shapecurveto swf_shapecurveto3 swf_shapearc swf_endshape swf_definefont swf_setfont swf_fontsize swf_fontslant swf_fonttracking swf_getfontinfo swf_definetext swf_textwidth swf_definebitmap swf_getbitmapinfo swf_startsymbol swf_endsymbol swf_startbutton swf_addbuttonrecord swf_oncondition swf_endbutton swf_viewport swf_ortho swf_ortho2 swf_perspective swf_polarview swf_lookat swf_pushmatrix swf_popmatrix swf_scale swf_translate swf_rotate swf_posround LVII. Sybase functions sybase_affected_rows sybase_close sybase_connect sybase_data_seek sybase_fetch_array sybase_fetch_field sybase_fetch_object sybase_fetch_row sybase_field_seek sybase_free_result sybase_num_fields sybase_num_rows sybase_pconnect sybase_query sybase_result sybase_select_db LVIII. URL Functions base64_decode base64_encode parse_url urldecode urlencode LIX. Variable Functions doubleval empty gettype intval is_array is_double is_float is_int is_integer is_long is_numeric is_object is_real is_string isset print_r settype strval unset var_dump LX. Vmailmgr functions vm_adduser vm_addalias vm_passwd vm_delalias vm_deluser LXI. WDDX functions wddx_serialize_value wddx_serialize_vars wddx_packet_start wddx_packet_end wddx_add_vars wddx_deserialize LXII. XML parser functions xml_parser_create xml_set_object xml_set_element_handler xml_set_character_data_handler xml_set_processing_instruction_handler xml_set_default_handler xml_set_unparsed_entity_decl_handler xml_set_notation_decl_handler xml_set_external_entity_ref_handler xml_parse xml_get_error_code xml_error_string xml_get_current_line_number xml_get_current_column_number xml_get_current_byte_index xml_parser_free xml_parser_set_option xml_parser_get_option utf8_decode utf8_encode V. Appendixes A. Migrating from PHP/FI 2.0 to PHP 3.0 About the incompatbilities in 3.0 Start/end tags if..endif syntax while syntax Expression types Error messages have changed Short-circuited boolean evaluation Function true/false return values Other incompatibilities B. PHP development Adding functions to PHP3 Function Prototype Function Arguments Variable Function Arguments Using the Function Arguments Memory Management in Functions Setting Variables in the Symbol Table Returning simple values Returning complex values Using the resource list Using the persistent resource table Adding runtime configuration directives Calling User Functions HashTable *function_table pval *object pval *function_name pval *retval int param_count pval *params[] Reporting Errors E_NOTICE E_WARNING E_ERROR E_PARSE E_CORE_ERROR E_CORE_WARNING C. The PHP Debugger Using the Debugger Debugger Protocol List of Tables PHP Modules Escaped characters Arithmetic Operators Bitwise Operators Comparison Operators Increment/decrement Operators Logical Operators Operator Precedence Calendar modes Calendar week modes Font file format Returned Objects for imap_fetchstructure() Primary body type Transfer encodings Mailbox properties LONGVARBINARY handling error_log() log types error_reporting() bit values The user information array The user information array XML parser options UTF-8 encoding PHP Internal Types Debugger Error Types List of Figures Internal Structure Request Scheme NetCraft Webserver Survey List of Examples An introductory example Ways of escaping from HTML Here doc string quoting example Some string examples Simple form variable More complex form variables SetCookie Example Defining Constants Using __FILE__ and __LINE__ include() in PHP3 and PHP4 Variable function example GIF creation with PHP HTTP Authentication example HTTP Authentication example forcing a new name/password File Upload Form Uploading multiple forms Getting the title of a remote page Storing data on a remote server getallheaders() Example array() example array_count_values() example array_flip() example array_keys() example array_merge() example array_pad() example array_pop() example array_push() example array_reverse() example array_shift() example array_slice() examples array_splice() examples array_unshift() example array_values() example array_walk() example arsort() example asort() example compact() example each() examples Traversing $HTTP_POST_VARS with each() Extract() example in_array() example krsort() example ksort() example list() example rsort() example shuffle() example sort() example uksort() example usort() example Aspell_new() Aspell_check() Aspell_check_raw() Aspell_suggest() Calendar functions easter_date() example Easter_date() example Text output Text output Save/Restore Adding a page outline gzopen() example Date() example Date() and mktime() example Gmdate() example Gmstrftime() example Mktime() example Last day of next month Strftime() example Strtotime() example Creating a dBase database file Using dbase_numfields() Visiting every key/value pair in a dbm database Dir() Example List all files in the current directory List all files in the current directory and strip out Mcrypt_get_cipher_name() example Mcrypt_create_iv() example basename() example copy() example dirname() example diskfreespace() example Fgetcsv() example - Read and print entire contents of a CSV file Reading a file line by line fopen() example Tempnam() example touch() example Accessing the form data Populating a PDF document Gettext()-check mhash_get_hash_name example Traversing all hashes setcookie() examples modifying an attribute adding a completely new attribute modifying Title attribute modifying Title attribute removing attribute GetImageSize GetImageSize returning IPTC Example to handle an error during creation (courtesy vic@zymsys.com) Example to handle an error during creation (courtesy vic@zymsys.com ) Example to handle an error during creation (courtesy vic@zymsys.com) ImageTTFText imap_append() example imap_mailboxmsginfo() example imap_createmailbox() example imap_getmailboxes() example imap_getmailboxes() example imap_open() example imap_rfc822_write_address() example imap_rfc822_parse_adrlist() example imap_setflag_full() example imap_status() example imap_fetch_overview() example Connect to a Informix database Closing a Informix connection Show all rows of the "orders" table as a html table Insert some values into the "catalog" table Informix affected rows Retrieve Informix sqlca.sqlerrd[x] values Informix fetch rows Informix results as HTML table Fielnames and SQL fieldtypes Informix SQL fieldproperties Ibase_connect() example Complete example with authenticated bind Show the list of attributes held for a particular directory entry List all values of the "mail" attribute for a directory entry Produce a list of all organizational units of an organization LDAP search Enumerating all LDAP error messages Generating and catching an error Sending mail Sending mail with extra headers base_convert() Defining Constants die example Eval() example - simple text merge Get_browser() example Pack() format string Serialize() example Unpack() format string Unserialize() example Msql_tablename() example MySQL close example MySQL connect example MySQL create database example MySQL data seek example mysql fetch array mysql fetch object mysql field types mysql_query() mysql_query() Mysql_tablename() Example Fsockopen() Example Example for the default domain Example for the NIS order Example for the NIS master Example for NIS match Example for the NIS first Example for NIS next ODBC Setoption Examples OCIDefineByName OCIDefineByName OCILogon OCINLogon OCINewDescriptor OCIRowCount OCINumCols OCIFetchStatement OCIColumnSize OCIServerVersion Code examples Using a REF CURSOR from a stored procedure Using a REF CURSOR in a select statement OCIColumnName OCIColumnType Save and Restore Translation Scaling Including a gif image Including a memory image Multiple show of an image Getting the page number out of a string Getting all phone numbers out of some text Replacing several values Using /e modifier Getting parts of search string preg_grep() example error_log() examples getlastmod() example Getrusage Example phpversion() example Setting an Environment Variable pg_cmdtuples PostgreSQL fetch array Postgres fetch object Postgres fetch row ereg() example ereg_replace() example split() example split() example sql_regcase() example session_name() examples Addcslashes() example Chop() example Chr() example Chunk_split() example Echo() example Explode() example Translation Table Example Meta Tags Example Implode() example Ord() example Using parse_str() Rawurlencode() example 1 Rawurlencode() example 2 Soundex Examples Sprintf(): zero-padded integers Sprintf(): formatting currency strcasecmp() example Strrchr() example Str_repeat() example Strstr() example Strtok() example Strtolower() example Strtoupper() example Str_replace() example Strtr() example Substr_replace() example ucfirst() example ucwords() example swf_addbuttonrecord() function example Urldecode() example Urlencode() example Unset() example wddx_serialize_vars example Migration: old start/end tags Migration: first new start/end tags Migration: second new start/end tags Migration: third new start/end tags Migration: old if..endif syntax Migration: new if..endif syntax Migration: old while..endwhile syntax Migration: new while..endwhile syntax Migration from 2.0: return values, old code Migration from 2.0: return values, new code Migration from 2.0: concatenation for strings Fetching function arguments Variable function arguments Checking whether $foo exists in a symbol table Finding a variable’s size in a symbol table Initializing a new array Adding entries to a new array Adding a new resource Using an existing resource Deleting an existing resource Example Debugger Message

Download the file decompressor 7-zip.
Download the PDF reader Foxit PDF Reader.
|
|
| |
|