RSS, also called aggregated content, is a format for describing and synchronizing web site content. The following code to generate an RSS subscription:RSS XML Structure
Website name
http://www.111cn.net/
website Description!
rss tutorial
Content.txt
This file contains content, if you are combined with the MySQL database, as long as you replace this sentence with the content of your database.
index.php file
Include (' page.class.php ');A custom long article string that can
Converting arrays into JSON in PHP
Powerful PHP already provides built-in functions: Json_encode () and Json_decode (). It's easy to understand that Json_encode () is converting a PHP array into JSON. Instead, Json_decode () converts JSON into a
PHP functions to filter HTML:
Strip_tags (String)
This will allow you to filter out all the HTML tags.
If you want to filter out all HTML tags except ", you can write this:
Strip_tags (String, "");
To filter all HTML tags except xxx, you can
Date () function
This function is more familiar.
The code is as follows
Copy Code
Echo ("Result with date (): ");Echo (Date ("L"). "");Echo (Date ("L DS of F Y h:i:s A"). "");Echo ("Oct 3,1975 is on a". Date ("L",
Phpexcel is a very powerful class library for PHP operations Excel, but it's a little complicated to simply export data to excel in PHP, which has a class of PHP export Excel on Google code that can be easily invoked.
The code is as
Under Windows cmd, you can execute PHP files by Php.exe, and then write the command to bat to execute it regularly, probably more reliably than the browser's timed refresh.
The path to the Php.exe and the path to the PHP file to execute (code below)
PHP5.2.17 Official Download: Http://windows.php.net/downloads/releases/php-5.2.17-Win32-VC6-x86.zipPHP5.3.5 Official Download: Http://windows.php.net/downloads/releases/php-5.3.5-Win32-VC9-x86.zipFirst install good IIS7 installation should pay
Html
First, the jquery library and the Cityselect plug-in are loaded into the head.
The code is as follows
Copy Code
Next, in #city, we put three select, and three select Set the Class property to: Prov, city,
PHP code
The code is as follows
Copy Code
Class Search extends scurd{/* constructor, initializing the connection, using the same method as the parent class * *function __construct ($HOST, $DB _user, $PASSWD, $DB) {Parent:
I. Small orderHTML is easy to learn and common. Common PHP programs are embedded in the HTML language. However, as WEB applications become more and more widely used, the weakness of HTML becomes more and more obvious. The emergence of XML makes up
The code is as follows:Copy code Function getAgeByID ($ id ){ // After this year's birthday, you will be 1 year old.If (empty ($ id) return '';$ Date = strtotime (substr ($ id, 6, 8 ));// Obtain the date of birth, month, and day$ Today =
Php regular format IP address, hide the last one.Example The code is as follows:Copy code // Hide the last digitReturn preg_replace ('/(\ d + )\. (\ d + )\. (\ d + )\. (\ d +)/is ', "$1. $2. $3. * ", $ ip ); // The last number of hidden IP
I. json_encode ()This is a common function for JSON encoding of variables. However, when the text format is not UTF-8, Chinese transcoding may encounter some problems, such as when the text is gb2312.Example The code is as follows:Copy code $
InheritanceThese classes are usually required. These classes have the same variables and functions as other existing classes. In fact, defining a general class for all projects and constantly enriching the class to adapt to each specific project is
The unlink () function deletes a file.If the call succeeds, true is returned. If the call fails, false is returned.SyntaxUnlink (filename, context)Parameter descriptionFilename is required. Specifies the file to be deleted.Context is optional.
Php Tutorial float data application details1 float round (float $ val [, int $ precision]) returns the result of rounding val according to the specified precision (number of digits after decimal point. Precision can also be negative or zero (default
In the php Tutorial, the checkbox value is obtained and displayed. Multiple values are obtained.Simplest checkbox value code checkbox demo checkbox demo demonstrates checkboxes fries soda shake ketchup checkbox demo demonstrates reading
1. define the constant define ("constant", "hello world .");Constants can only contain scalar data (boolean, integer, float, and string ).When calling a constant, you only need to obtain the constant value with a simple name, instead of adding the "$
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