!function_exists (' cdstr ') exit (' forbidden ');Class Wrzc_netpage {Private $page _name= "P";Private $pagesize =10;//Display the number of record bars per pagePrivate $total The total number of =0;//recordsPrivate $pagebarnum number of
First, we introduce some concepts to understand CGI and FastCGI
Cgi
The Universal Gateway Interface (Common Gateway interface/cgi) is an important Internet technology that allows a client to request data from a Web browser to a program executing
Simple Factory mode:
① abstract base class: class definition abstract Some methods to implement in subclasses② inherits from the abstract base class: Implementing an abstract method in a base class③ Factory class: Used to instantiate objects
What
Read and write in a file, one file is an index file, and the other is a real data file.The index file is divided into 2 parts, the first part is all pointers, the position of the second part, and the second part is the index record. All index
Use PHP's unique array_map function to traverse the edges of all strings in the array to clear the space
The code is as follows
Copy Code
function Trimarray ($Input) { if (!is_array ($Input))Return trim ($Input);
One: Sequential structureTwo: Branch structure (conditional structure, selection structure)1. One-way branch:Conditions: bool,true or false,> if (condition)Execute one of the following statementsif (condition){Code Snippets:Code
Here are a few ways to jump:
One of the most common methods on the Web:
The code is as follows
Copy Code
$url = $_get[' url '];Header ("Location: $url");?>
Put this code in a folder, named for example go.php
Idea: Since the interstellar picture is made up of several parts: the map (the terrain and the minerals), the building, the troops. Then we think of them as parts, assembled to be the final product (the whole picture).
Builder (Builder) mode
Example method for using the header function to set HTTP headers in PHP
The code is as follows
Copy Code
Define EncodingHeader (Content-type:text/html;charset=utf-8);AtomHeader
When an exception is triggered, it usually occurs:
An error exception handling module, similar to other languages, was added to the PHP5. The exception generated in the PHP code can be thrown by the throw statement and caught by the catch statement.
The code is as follows
Copy Code
MySQL tutorial _connect (' localhost ', ' 0731-cn ', ' 0731licheng1 ') or Die (' sever ');mysql_select_db (' 0731-cn ') or Die (' Database error ');$sql = "Select uid from member";$query = mysql_query
If your own server can also implement denoted domain name is good. It's not complicated, actually. You can also do a denoted domain Name System. The key technology of denoted domain Name System lies in: Implementing the redirection of Web pages
Templates can improve the structure of your site. This article explains how to use templates to control page layouts in a Web site composed of a large number of static HTML pages through a new feature and template class in PHP 4. Outline:============
PHP Tutorials Show articles a few minutes ago, a few hours ago, a few days ago released class
When the article was published, the Unix timestamp was converted to a hint such as a few minutes ago, a few hours ago, a few days ago. such as micro-blog
We've renamed the file, and we've used the rename function. Oh, well, crap, I'm not saying much. Let's take a look at the code that reads the catalog file and then names the file.
function Checkdir ($dir _path){if (Is_dir ($dir _path)){if ($dir
PHP provides 4 ways to execute system external commands: EXEC (), PassThru (), System (), Shell_exec ().Before beginning the introduction, check the PHP configuration file php.ini is prohibited this is a function. Locate the Disable_functions and
PHP to achieve the continuation of breakpoints, you need to split large files into small files, and then a single upload. After the transfer is merged.
│merge.php– Merge File Script│merge.zip– merged file│socket.zip– files that need to be
Definition and usageThe explode () function separates strings into arrays.SyntaxExplode (separator, string, limit)ExampleIn this example, we split the string into an array: The code is as follows:Copy code $ Str = "Hello world. It's a beautiful
Definition and usageIs_infinite () determines whether it is an infinite value.SyntaxIs_infinite (x) parameter descriptionX is required. Specifies the value to be checked.DescriptionIf x is infinite (positive or negative), for example, log (0)
1. $ _ GET is used to obtain data in the form of get in the table method.2. $ _ GET url. php? I = 12 data,The above is the data we often use get to obtain values,Instance 1: Get form data The code is as follows:Copy code Name: Get. phpAssume
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