On the previous page I began to explain the importance of object-oriented and how to create a basic object. We will finalize a lot of details here and now.class variables and visibilityIn class, we first determine our variables. In this case, our
Introduction
This tutorial is just a dirty one and explains how to use the Include () function to make your PHP code life easier to write. Basically include () functions including files placed in parentheses within the main argument of the document.
It's okay to use Php+txt now realize a website counter program, the code we mainly use File_get_content and Fopen,fwrite read and write on the OK.
Class sit_count{Public $FileName = ' count.txt ';function Count_add () {if (file_exists
How do I get information about the server in the PHP way? In fact, only three code, that is, you can easily get to the end of a file related information and the site information. The code is as follows:
$fp = fopen ("http://www.***.com/***.htm", "
Filesize(PHP 4 and PHP 5)Filesize-get the file sizeDescriptionInternational filesize (string $ file name)Obtain the file of the specified size.ParametersFile nameFile path.Return valueThe size of the returned file is in bytes, or FALSE (and the
Syntax:Definition and usageThis file () reads a file to an array.Each array element is contained from this file, and linefeeds are still valued.SyntaxFile (path, include_path, context)ParameterDescriptionPathFile pathInclude_pathOptional. Set this
Definition and usageThis chown () function is used to change the permissions of a specified object.If TRUE or FALSE is returned, the operation fails.SyntaxChown (file, owner)ParameterDescriptionFileRequired. Specified check fileOwnerRequired.
Definition and usageThe filter_list () function returns all the supported filters of an array.SyntaxFilter_list ()Tips and instructionsNote: this result does not function the filter number, but the name of the filter. Use the filter_id () function
Definition and usageThe filter_var_array () function obtains multiple variables and their selected filters.This function is useful in filtering many values that do not require filter_var (), many.Returns an array of values required for the success
Definition and usageTheStrripos() The first character of a function appears in a string.If a function exists, return success; otherwise, return FALSE.SyntaxStrripos (string, find, start)Parameter descriptionString: required. String searchFind:
Definition and usageThe str_shuffle () function randomly shuffles all character strings.SyntaxStr_shuffle (string)ParameterDescriptionStringString required. Specify string shufflingLet's take a look at the str_shuffle function tutorial. Output
PHP parse_str () function example tutorialDefinition and usageThis parse_str () function parses a variable from the query string.SyntaxParse_str (string, array)ParameterDescriptionStringRequiredArrayOptional. The specified name stores the variable
PHP tmpfile () function example tutorialDefinition and usageThe tmpfile () function creates a unique name read/write (watt +) mode in a temporary file.SyntaxTmpfile ()Note: when a temporary file is automatically deleted, fclose () is disabled, or
PHP array_push () function example tutorial and usageDefinition and usageThis array_push () function inserts an array at the end of one or more elements.SyntaxArray_push (array, value1, value2 ...)Parameter descriptionArray required. Specify an
Php file_get_contents function,This function is used to read the content of the remote server file, which greatly facilitates the collection of friends. You can save the remote server file to your own database with a simple sentence, you can't
/*Paging is very simple. Next we will mainly talk about paging principles and implementation methods.*//*In this way, we can know several pages.For example, if the result of a list is 126 rows and 20 rows on one page are divided into 7 pages,
The code is as follows:Copy code Public function substrgb ($ in, $ num) {// $ Num = 16;$ Pos = 0;$ Bytenum = 0;$ Out = "";While ($ num ){ $ C = mb_substr ($ in, $ pos, 1, "euc-jp ");If ($ c = "") break;If (strlen ($ c) = 1 ){$ Pos ++;$
The code is as follows:Copy code Header ("content-type: text/html; charset = utf-8 ");?> // Uploadaction. php The code is as follows:Copy code Header ("content-type: text/html; charset = utf-8 ");If (! Empty ($ _ files )) {$ Date = date
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service