TAILIEUCHUNG - PHP Developer's Dictionary- P71

PHP Developer's Dictionary- P71:PHP is an open source, server-side, HTML-embedded scripting language used to create dynamically generated Web pages. With an easy-to-use syntax and a large, extensible library of modules, PHP brings together the best of Perl, C++, and other languages. | PHP Developer s Dictionary Description The fgetcsv function gets a line of data from a comma-separated value CSV file referenced by the file pointer fp . It returns an array with the values separated by the optional delimiter . If delimiter is not specified a comma is assumed. The parameter length is the longest line of the CSV file allowing for trailing carriage returns and line feeds. Note A blank line in the input CSV file will be translated into an array with one null field. The blank line will not be interpreted as an error. fgets Syntax string fgets int fp int length Description The fgets function reads the file referenced by fp and returns a string of length -1. If an end of file EOF is reached the length parameter is ignored and the string is returned. The function will return false 0 if there is an error reading the file. fgetss Syntax string fgetss int fp int length string allowable tags Description The fgetss function reads the file referenced by fp and returns a string of length -1. If an end of file EOF is reached the length parameter is ignored and the string is returned. This function strips out any HTML or PHP tags from the input file. The optional parameter allowable_tags defines any tags that are not to be stripped out of the input file. The function will return false 0 if there is an error reading the file. file IT-SC book 350 PHP Developer s Dictionary Syntax array file string filename int use include path Description The fiie function reads the file specified by filename and returns an array containing each line of the file. If the optional parameter inciude_path is set to 1 the file will be searched for in the include path. file_exists Syntax int file_exists string filename Description The file_exists function checks for the file defined by filename and if it exists the function returns true 1. If the file doesn t exist false 0 is returned. Note The results of this function are cached by PHP. Any subsequent calls to fiie_exists will return the

TÀI LIỆU HOT