Iframe: in fact, the upload program page is opened on the current page, a bit like a partial ajax refresh, but we put it to the iframe page for upload, at the same time, the iframe page is hidden.
A simple iframe upload example:
In this example, the
In php, data queries can be classified into one-dimensional array queries and multi-dimensional array queries. If it is a simple one-dimensional array, we can directly use in_array, array_search, and traversal for instances, if it is a
This article introduces the php program for converting Chinese characters to Unicode encoding. For more information, see.
Program
The Code is as follows:
Copy code
/*** $ Str original string* $ Encoding of the original
Many website users first visit a page to log on, but at that time they did not log on and then log on. After the user logs on successfully, they certainly want to return to the last accessed page, next, I will introduce you to the page instance you
To download files in php, we use the readfile () function directly. readfile () can download the server source files, next, I will introduce the methods and performance of downloading files from readfile.
Example 1
The Code is as follows:
In php, there are many array sorting functions (rsort, sort, asort, rsort, krsort, ksort, array_multisort ), next I will give you a summary of some of our commonly used array sorting functions and the array sorting instances written by the user. For
The header () function is widely used in php. I will introduce some methods to implement page cache using it. However, before using the header, you must note that no output can be made before it, contains spaces.
In the manual, we write how to set
To obtain the memory used by the php script in php, we can use the built-in function memory_get_usage () in php to check the memory occupied by the current PHP script execution. Let's take a look at it.
Memory_get_usage () official syntax
I.
We want to write a paging program for the native article content. The principle is very simple, that is, we insert a paging character in the editor during editing, and then we can directly use explode Paging for display, of course, it is more
In php, address verification is written in a variety of ways. Below I will summarize several common email address verification instances, the simplest is to directly use the regular expression preg_match (\ "/^ ([a-z0-9 \ + _ \-] + )(\\. [a-z0-9 \ +
This article introduces three methods to compress the ob_gzhandler function in php. If you need to know the usage of the ob_gzhandler function, you can refer to this document.
There are three ways to use the ob_gzhandler function to compress php:
1.
It is very good to use the PHP template class for programming, but sometimes you may encounter a problem, such as outputting a table, but the number of rows of the table is not known until it is run, such as message boards, BBS, and shopping
This stuff took me a day... However, at the end, I found that I could not achieve the effect I imagined... It's a pity... It seems that PHP still needs to strengthen XML... If anyone has research on this. Thank you for writing to us...Create a table
* Example:** $ Xml = new xml ("dbase. xml", 'table ');** $ Data = $ xml-> xml_fetch_array ();** Echo " ";** Print_r ($ data );*Class xml{Var $ dbase; // database, the XML file to be readVar $ dbname; // Database Name, top-level element, consistent
// Full directory path$ Filepath = "/home/httpd/html/tut/upload ";// 200 K is the maximum (picture) file size to be acceptedDefine ("MAX_FILE_SIZE", 200*1024 );Function print_error ($ err ){Echo " $ err ";}Do {// Check if picture name variable has
Php class usageToday, let's talk about php class in basic usage. First, you need to understand what a class is: the definition of a class is as follows:
It is unique, flexible, universal, and important. This is a definition of the like. For more
Ajax creation code
Var http_request = false;Function send_request (url) {// initialization, specifying the processing function and sending the request functionHttp_request = false;// Start initializing the XMLHttpRequest objectIf (window.
Php Tutorial: stristr function instance tutorial
Definition and usageThis stristr () function searches for a series of other internal strings for the first time.
This function returns the remaining strings (from the matching point), or FALSE if
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