PHP article click to see the code, now we see a lot of sites will have articles are browsed how many points, click how many times, comments how many times, and so is it, the following is our program is based on different parameters to achieve the
In PHP we have to count the length of the data there are two functions commonly used in PHP sizeof () and count () they have the same effect,
Grammar:
sizeof (ARRAYNAME);
Tips and InstructionsNote: This feature may return 0 if a variable is
PHP Array_chunk () function
Definitions and usageA series of array_chunk () functions splits into a new array.
Grammar
Array_chunk (Array,size,preserve_key) Parameter Description array Required. Specifies the array to use size Required.
PHP's $ _get and $ _post variables are the forms used to retrieve information, such as user input.
The form of PHP processing
The most important thing to notice when dealing with HTML forms and PHP is that any form of factor HTML page
Okay, now let's look at the program code for the login.php file.
Session_Start ();Include ("global.php");if (isset ($_post[' username ')) && isset ($_post[' pwd ']){$result = mysql_query ("SELECT * from Xx_admin");if ($info = mysql_fetch_array
Array_values (PHP 4 and PHP 5)Array_values-returns an array of all valuesDescriptionArray array_values (array $ input)Array_values () returns an array of all input values and an array of metric values.ParametersInputArray.Return valueReturns an
Array_unshift(PHP 4 and PHP 5)Array_unshift-Prepend the beginning of one or more elements, an arrayDescriptionInternational array_unshift (array & $ array, mixed: $ var [, mixed $...])Array_unshift () prepends uses the front array of elements. Note
Get_magic_quotes_gpc(PHP 4 and PHP 5)Get_magic_quotes_gpc-get the magic quotes of the current configuration settings.DescriptionInternational get_magic_quotes_gpc (invalid)Returns the configuration settings of the current magic_quotes_gpc.Remember,
Php_ini_loaded_file("= 5.2.4" in PHP 5)Php_ini_loaded_file-the retrieval path loads the php. Ini file.DescriptionString php_ini_loaded_file (invalid)Check if the php. Ini file is in and retrieve its path.ParametersThis function has no
Parameter or set_time_limit(PHP 4 and PHP 5)The parameter or set_time_limit-limits the maximum execution time.DescriptionInvalid parameter or set_time_limit (seconds)Set the number of seconds for the script to run. If this is done, the script
Base64_decode(PHP 4 and PHP 5)Base64_decode-base64-encoded MIME of the decoded dataDescriptionString base64_decode (string $ Data [, Boolean $ strict = false])Decodes BASE64 encoded data.ParametersDataEncoding data.StrictReturns FALSE if the input
Parse_url(PHP 4 and PHP 5)Parse_url-parse the URL and return its componentsDescriptionHybrid parse_url (string $ URL [Abstract $ part =-1])This function parses a URL and returns a URL with an associated array containing all components. There are
Fileinode(PHP 4 and PHP 5)Fileinode-get the inode of the fileDescriptionInternational fileinode (string $ file name)Obtain the inode file.ParametersFile nameFile path.Return valueReturn some files on inode, or FALSE.InstanceFor example, #1 compares
Filegroup(PHP 4 and PHP 5)Archive Group-get filegroupDescriptionInternational Archives Group (string $ file name)The obtained filegroup. The format of the returned value in the group ID. Use posix_getgrgid () to solve this problem.ParametersFile
Umask value(PHP 4 and PHP 5)Umask-changed the current umaskDescriptionInterpreted umask ([International $ mask])Set the umask value of PHP to mask and 0777, and return the old umask. When PHP is used as a server module and umask is restored, each
File(PHP 4 and PHP 5)File-read the entire file to an arrayDescriptionA series of files (string $ file [Summary $ flag = 0 [, resource $ background])Read the entire file to an array.Note: You can use file_get_contents () to return the file content as
File_put_contents(In PHP 5)File_put_contents-write a string to a fileDescriptionInternational file_put_contents (string $ file name, mixed $ Data [Summary $ flag = 0 [, resource $ background])This function requires the fopen () function, fwrite ()
Feof(PHP 4 and PHP 5)Feof-pointer to the end of the test fileDescriptionBoolean feof (resource $ processing)File pointer at the end of the test.ParametersHandleThe file pointer must be valid and must point to a file that successfully opens fopen ()
Dirname(PHP 4 and PHP 5)Dirname-return the path of components of the directory nameDescriptionString dirname (string $ path)Given that a string contains a path file, the name of the directory returned by this function.ParametersPathA path.In Windows,
Chgrp(PHP 4 and PHP 5)Chgrp-change the file GroupDescriptionBoolean chgrp (string $ file name, mixed $ group)Filename Group of the archive that attempts to change the group.Only the Supervisor can change any file in the group. Other users may change
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