Source: AesopDesktop Center (I) creating databasesAuthor: elongThis is the first time the younger brother wrote an article. I don't know if it can be released .. I want to write the program for your reference. If any expert can develop a better
File 7: globres. tml the following results are from the domain name query system provided on this site, you can order unregistered domain names or query the details of registered domain names. SCRIPT_NAME click here to return to the domain name
By coldwind/iwind/month/ccterran http://iwind.orgFor a long time, I asked people around how to implement static Web pages and asked questions. Now, I finally come up with a very simple solution, that is, using libtemplate to implement it.Look: http:/
PHP5 allows you to restrict access to class members. this is a new feature in PHP5, but it already exists in many object-oriented languages. with access, you can develop a reliable Object-oriented Application and build reusable object-oriented class
Sometimes, when writing a program, the background requires that a large amount of data be imported into the database. For example, the computer examination result query and phone book data are generally stored in excel, in this case, we can export
One of the common errors on the web is invalid links. Once an invalid link appears from another site, you will reschedule. People will save their favorite sites as bookmarks. If they visit the site again three months later, they will only find that '
Now we finally get to our third file, include. php, which creates a user interface for the program."Include. php" contains three forms. Some PHP code obtains the current directory list and stores them in three variables.$ Files (including files in
The following is the file code for backing up a Mysql database through Apache + PHP in Linux:
File 1. Listtable. php (the file lists all tables in the database for backup)
Select the table to back up:$ Con = mysql_connect ('localhost', 'root',
1 modifier: as if not mentioned2. The matching mode seems to be lessFor example, $ Cp = preg_replace ("@ @ I am confusedThanks for your help.
"@ @Sometimes [^>] +? Get exact match.
Later, I found through tracking that the appearance of such cases is closely related to the file_get_contents () function of PHP.HTTP-based API calls are common for large and medium-sized websites. PHP programmers like to use the simple and
The following code is used for GB2312 encoding. intercepting a Chinese string is a headache in PHP. The solution is to determine whether the value is a double byte character based on whether the value is greater than or equal to 128, to avoid
Copy codeThe Code is as follows:Date_default_timezone_set ("ETC/GMT-8 ");$ Tm = time ();Echo date ("Y-m-d h: I a", $ tm );Echo " ";Echo date ("Y-m-d", $ tm );?>The Default time Zone of PHP is UTC, while Beijing is located in the GMT + 8, which is
We often use PHP to take the entire function, mainly including ceil, floor, round, intval.
Ceil -- integer in a single methodDescriptionFloat ceil (float value)
Returns the next integer of no less than value. If the value has a decimal part, it is
Copy codeThe Code is as follows:$ Setting = array (// Black Probability0 => 0.99,// White Probability1 => 0.01,);// Requires the GD LibraryHeader ("Content-type: image/png ");$ Im = imagecreatetruecolor (256,256) or die ("Cannot Initialize new GD
1. Super simple page CacheIf your project is not based on a CMS system or framework, creating a simple cache system will be very practical. The following code is very simple, but it can solve problems for small websites.Copy codeThe Code is as
Require '../inc/conn. php ';?>// Initial parameter settings$ Pagesize = 5; // page size$ Pagenum = 1; // the first page is displayed by default.// Step 1: Obtain the current pageIf ($ _ GET ){If ($ _ GET ['pagenum']) {$ Pagenum = $ _ GET ['pagenum'];
Copy codeThe Code is as follows:/*** Adapter Mode** Convert an interface of a class to another interface that the customer wants. classes that are originally incompatible and cannot work together can work together.*/// This is the original typeClass
Copy codeThe Code is as follows:Function array_add ($ a, $ B ){// Obtain the intersection of two arrays based on the key name$ Arr = array_intersect_key ($ a, $ B );// Traverse the second array. If the key name does not exist with the first array,
URL jump code1. Code: For example, if you save it as aaa. php, You can implement aaa. php? Url = www.baidu.com jump to Baidu.This simple call of the default $ _ GET variable. and php default jump Location:2. instance upgrade: add if LoopCode:Copy
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