Summary of precautions for using variables on the webpage. Variable definition
⚑Variable type
⚑Use of variables
Variables are objects that can be constantly changed in the memory. we can think of the memory as a sub-district. There are many tenants
Some of the following uses have never been seen by a considerable number of PHP enthusiasts. What are these things? We often see many strange PHP syntaxes in the templates of wordpress blog programs, such:
The code is as follows:
Empty
For
Fread () reads a maximum of length bytes from the file pointer handle. Description
String fread (int handle, int length)
Fread () reads a maximum of length bytes from the file pointer handle. This function can be read by a maximum of length bytes,
I really don't need to know. In fact, there are still many good things that we are familiar with in PHP. When I saw this article, I burst into tears several times. I strongly recommend that you sort it out by myself.
Sys_getloadavg ()
This function
Continue to use cons to modify constants in the PHP5 class. We use const to define a constant. the defined constant cannot be changed. In PHP5, constants defined by const are different from those defined by variables. you do not need to add a $
Run the installation file (zendserver-ce-php-5.3.2-5.0.1-windows_x86.exe.
No changes are made here. keep the default option.
Click the Browse button to change the installation directory to D.
Change the Web Server Port to 85 to
This is explained in the PHP Manual: file_get_contents-reads the entire file into a string, so it is easy to get information from other sites, use regular expressions to transform, and then make some judgments and settings, it's okay. I don't want
Today, on the Internet, many websites need to process a large number of images, such as portraits, uploaded images, thumbnails, and watermarks. They need a lot of image processing on the server side, and a good server language environment must have
PHP is often accused of allowing URLS to be imported and executed. In fact, this is not surprising because it is one of the most important reasons for the php application vulnerability called RemoteURLIncludevulnerabilities. For this reason, many
For more information about how to install Memcached in Windows, see. Memcache
(In fact, it is relatively simple to install in Windows)
Source code package preparation:
1, memcached 1.2.1 for Win32 binaries
This is the latest version of memcached
Php file cache performance testing. For more information, see.
Common PHP Cache methods:
First, process the data to be cached to form a file that can be directly executed by PHP. When data needs to be cached, it is introduced and used in the
PHPString class. Currently, only the encode and decode methods are supported.
Usage:
The code is as follows:
$ S = 'China ';
$ OS = new String ($ s );
Echo $ OS-> decode ('gbk '),'';
Echo $ OS-> decode ('gbk')-> encode ('md5 '),'';
Code
The
The QueryPath (QP) library achieves jQuery-like effects in PHP. It can also be used to conveniently process XMLHTML... features are too powerful !!! JQuery
Official Homepage http://querypath.org/Qp api manual
In the past few days, you need to write a program to extract the FLASH address of a video website address, such as an address of Youku. Then I implemented this function using PHP. I think it is a pleasure to use PHP to do this job! With its powerful
It is relatively simple, and my code optimization is also very complicated. The following code is used directly.
The code is as follows:
/*
Author: www.5dkx.com
Done: generate html documents
Date: 2009-10-27
*/
Require_once ("conn. php ");
If ($ _
Creating a progress bar with Ajax + php is actually very simple. Ajax
ReadyState = status (0, 1, 2, 3, 4)
0: The request has not been initialized and open has not been called.
1: The request has been created, but has not been sent yet.
2: The
Today's task is to create a database. because I know little about the database, the database table relationship is still poor.
The code is as follows:
// Date_default_timezone_set ("Asia/Shanghai ");
/*
Function create_siteinfo
DONE: website
Dedecms sets the basic code version for ads. For more information, see. Dede
1. at the end of each article in the article, click the advertisement position above the top,
The size of this position is 658*60 658 length. do not change the height of 60
Sometimes you need to obtain the content of an https webpage. for the following method, refer. If you use file_get_contents directly, an error is returned;
The code is as follows:
$ Url = (https://xxx.com ");
File_get_contents ($ url );
PHP has $ _ GET, $ _ POST, but no $ _ PUT, so if you need to use it, you have to simulate $ _ GET in PHP, $ _ POST, but no $ _ PUT, so if you need to use it, you have to simulate it yourself:
The code is as follows:
$ _ PUT = array ();
If ('put' =
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