About the author
Wang Dandan, a software engineer at IBM China Systems and Technology Center, has been working on WEB system design and development since 2006, and has five years of experience in designing and developing PHP applications.
Often
PHP version of the code is relatively simple:
Copy CodeThe code is as follows:
$p =$_get[' P '];
$pics =file ($p);
for ($i =0; $i {
echo $pics [$i];
}
?>
How to use: Save files to i.php and upload them to the root directory
Can not be outside
Sys_getloadavg ()
This function returns the load mean information for the current system (not applicable under Windows), and the detailed documentation can be read through the relevant PHP documentation. There is a sample code in the document that
Rewrite PHP preg_replace in C #.
The PHP language has a very powerful function, mostly supported by its powerful functions. In this article, we will give you a detailed explanation of how PHP function Preg_replace () is used.
php function
For a large message queue, it is too expensive to serialize and deserialize large databases frequently. Here is a message queue I implemented in PHP, only need to insert a data at the end of the operation of the tail, do not operate the entire
1. Distinguish between read lock and write lock.
If a write lock is used every time, it is not efficient to even read a single file into a queue for multiple processes.
2. Differentiate between blocking and non-blocking modes.
In general, if a
Recommended functions:
First, PHP gets the URL of the current page: Dedecms is also used for this
Copy CodeThe code is as follows:
Get the current script URL
function Getcururl ()
{
if (!empty ($_server["Request_uri"))
{
$scriptName =
As an intermediate Phper rookie. Bored to love in the various PHP forum blind turn. See a lot of PHP beginners have asked many of the same questions. And I've all met when I was learning PHP. to Let PHP beginners to take a few detours. So suddenly a
PHP Get file name
Copy CodeThe code is as follows:
function Retrieve ($url)
{
Preg_match ('/\/([^\/]+\.[ a-z]+) [^\/]*$/', $url, $match);
return $match [1];
}
PHP Get file name extension
Copy CodeThe code is as follows:
function Getext ($url)
{
Twilight, Hello!
Rainbird sent you a short message:
has written a lot of background running deamon. With a very handy, but I now want to get the pipeline passed over the content, do not know how to achieve, similar to echo "AAAA" |a.php,a.php how to
So what do you think about the objects in PHP? How to serialize the storage cost-performance highest? Then I thought of the JSON encoding and decoding functions recommended by my colleague.
According to him, Json_encode and json_decode are more
system Functions
Description: Executes external program and displays output data.
Syntax: string system (String command, int [Return_var]);
return value: String
Detailed Description:
This function is like the function system () in C, which
That is, the sum of the number of integers and decimals should not exceed 6 bits, if the fractional part is too long, then the system will be rounded to approximate 6 bits, if the integer part is too long, then also approximate to become 6 bit
For
0.
Use single quotation marks instead of double quotes to contain strings, it will be quicker. Because PHP will search for variables in a string surrounded by double quotes, single quotes will not, note: only echo can do this, it is a string can be
However, there is generally no coding problem in English, only the Chinese data will have this problem. For example, when you write a program with Zend Studio or editplus, using GBK encoding, if the data needs to enter the database, and the database
1 Create a database table:
Copy CodeThe code is as follows:
Create DATABASE Club;
CREATE TABLE member (
ID Int (one) not NULL auto_increment,
No varchar (5) NOT NULL,
Name varchar (ten) is not NULL,
Age Int (2) is not NULL,
Level varchar (ten) is
File structure
|――images
|――include
|――parameter
|――config
|――function
|――index
Images storage image files, include is the system is to refer to the file, generally in the parameter stored in the parameter file, config in the configuration file,
To achieve GZIP compression page requires browser and server co-support, in fact, the server compression, uploaded to the browser after the browser decompression and parsing. There is no need for us to worry about the browser because most browsers
This is the main issue that is being discussed today. PHP Help document about PHP through the header trigger download of the instructions is relatively simple, and online about this aspect of the poor, there are many articles can not achieve the
Download the configuration file you need to install first.
1, apache-2.2.16
2, Php-5.2.14-win32
One, Apache configuration
Apache installation does not say, the installation process to choose the location you want to install, all the way next, you
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