Working with dates in PHP is inconvenient, such as finding a month between two dates? What should we do?
File name: date.inc.php3
Before using these two functions, convert the date or datetime to the timestamp type.
Such as:
$today =mktime
Error_log: Send out an error message.
Error_reporting: Configure the level of return for error messages.
GETENV: Obtaining the environment variables of the system
Get_cfg_var: Gets the configuration option value for PHP.
Get_current_user: Gets the
Input and output
Input and output should be said to be the basic function of many websites. User input data, Web site output data for other people to browse.
Take the current popular blog as an example, here the input and output is the author of
Data Add, delete, query, sort detailed description
Add data to an array (the data is added (without qualifying the number of bars) and anywhere in the middle.
2~ the deletion of the array (the number of data deletions (without qualifying bars) and
For Apache rewrite module opening and setting is not the subject of this article, please see the other articles in detail.
This class can only be used by PHP 5.30 or more, inheriting the features of the fast redirection of the previous version
A total of four files, respectively, is to create, add, delete, modify four functions, variables are written dead, change to a $_post way to receive it can be used
index.php Creating features
Copy CodeThe code is as follows:
$xmlpatch = '
However, some cases only need to pass a few files, and the file volume is not too large, in this case the use of components is a bit sledgehammer to kill the chicken feeling, through the HTML comes with the
form can achieve the required functions,
The way to clear whitespace is unsafe, in part because there are a lot of spaces in the characters, such as "The problem with addslashes is that hackers can use 0xbf27 instead of single quotes, and addslashes just modifies 0xbf27 to 0xbf5c27 to
The principle is to convert Chinese characters into hexadecimal and string combinations according to some rules, to realize character encoding and encoding, to ensure the integrity and compatibility of characters in the process of URL data
Parse_url(PHP 4, PHP 5)
parse_url-parse URL, return its components
descriptionArray Parse_url (string $url)
This function parses a URL and returns an associative array containing the various components that appear in the URL.
This function is not
Introduced
PHP is a very amazing language. It's strong enough (The biggest blog (WordPress) core language), it's broad enough (running on the biggest social networking site on Facebook), it's simple enough (as a beginner's preferred entry language).
First, PHP running mode in Apache
PHP is common in Apache.
three ways to work: CGI mode, fastcgi mode, Apache module DLL
The following are respectively compared:
1. CGI mode vs. module mode comparison:PHP differences between two modes of operation
A related introductionIntroduction to multi-server data sharing with 1.memcache + memcache, see http://www.guigui8.com/index.php/archives/206.html
2.session Mechanism:The session mechanism is a server-side mechanism that uses a hash-like structure (
The use of PHP code to force the download of the file type, sometimes require some files can not be opened online, but the implementation of the need to download, then use this function can be solved
function DownloadFile ($file) {/*coded by
This project is implemented using the Zend Framework Frameworkmodules/default/controllers/indexcontroller.php
indexcontroller.php
Copy CodeThe code is as follows:
Class Indexcontroller extends Zend_controller_action
{
Public Function init ()
{
/*
Because the use of PHP to write the main color recognition function is too much trouble, so I would like to introduce the use of K-means clustering algorithm to identify the image of the main tone method, than PHP 100 times times Oh.
Identify the
In PHP to simulate POST request data submission we will use the CURL function, below I would like to give you a few Curl analog Post request submission data examples of friends who need to refer to.
Note: The curl function is not supported by
In PHP Spl_autoload_register and __autoload method is php5 only, the following I will give you the use of the two magic functions, you can enter to understand.
The Spl_autoload_register () function should be one of the most used and very central
function can make our code very simple, recently read a lot of PHP-related knowledge, here to introduce you to the PHP associative array related knowledge. Description International Extract (array $ var_array [abstract $ extract_type =
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.