PHP template engine,Smarty,Unlike other template engines, such as FastTemplate or patTemplate, Smarty converts the Template into a PHP script, removes the additional code that appears in the parsing link for control and error check every time you
PHPIt is very convenient to process files and directories on the local server, but sometimes the permission and path problems may occur.
1. open the file
Resource fopen (string filename, string mode [, bool use_include_path [, resource
1. Super simple page Cache
If 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.
I designed a simple and interesting logon box function that contains Gravatar portraits. The headers are exported from gravatar.com Based on the email id. This article is a very basic CSS implementation and several lines of Jquery and PHP code. I
Today, I used to be an ASP. NET followers, who later passed the application of large-volume websites, told me that Microsoft is targeting most of the low-end and Middle-end groups, because of the bloated, intelligent, for example, SQL Server, iis,
In php, dirname () and _ FILE _ are our constants. This article will give you a detailed introduction to some issues in the use of dirname () and _ FILE _ constants, if you are interested, go to the reference page.
Dirname () function
String dirname
In php, we want to add or subtract time and date. We can use two functions: mktime and strtotime. Next I will introduce you to their usage.
Mktime Function
The mktime () function returns the Unix timestamp of a date.
The parameter always represents
The usage of strrpos and strripos is the same. Let's take a look.
Definition and usageTheStrrpos() The function determines whether find will appear in the string.
If this function is successful, otherwise FALSE is returned.
StrrposSyntax
Php tutorial mixed preg_replace_callback instance application code
// Requirement: Add a request = xxx after all connections. This function is more flexible than preg_replace. Note that it replaces the content of the entire regular expression.$
This article provides several php functions for getting the current time, such as date and time. It also shows me how to solve the time zone problem.
Php tutorial to obtain the current time functionThis article provides several php functions for
Php tutorial string truncation function (supports Chinese UTF-8 truncation)The two Chinese Character truncation function methods provided in this article are mainly used to solve the problem of how utf8 encoding correctly intercepts Chinese
Php tutorial array sorting usort uksort sort function
Sort ArraysThe usort () function uses a user-defined function to sort arrays.*/
Function cmp ($ a, $ B) // user-defined callback function
{
If ($ a ==$ B) // if the two parameters are
Regular ExpressionIs a single string used to describe or match a series of strings that conform to a certain syntax rule. In many text editors or other tools, regular expressions are usually used to retrieve and/or replace text content that meets a
Introduction
Currently, the logon function is available, but the password cannot be changed. Add the password change function this time.
Process
> Key points:
1. The two passwords cannot be blank and must be greater than or equal to 5 characters;
2.
Some useful functions can be saved as source code, and you can avoid writing them again later.File Read Function// File Read FunctionFunction PHP_Read ($ file_name ){$ Fd = fopen ($ file_name, r );While ($ bufline = fgets ($ fd, 4096 )){$ Buf. = $
According to Mr. Peng Wuxing's PHP Le, the header can send the Status header, as shown inHeader ("Status: 404 Not Found ");?>In this way, the user's browser can see the 404 error that the file cannot be found, but I tried this.Later, I checked the
This is a frequently used function, and some programs from others ......1. generate random string functionsFunction random ($ length ){$ Hash = '';$ Chars = 'abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxy ';$ Max = strlen ($
Php file_put_contents Function
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
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