Eaccelerator is really a good thing (its predecessor is Truck-mmcache).
In short, it is a set of PHP (support PHP5) operation of the caching system, through the sharing of memory or disk files to Exchange data.
It is widely used in PHP source code
Copy Code code as follows:
/*
* Paging function
* $num Total number of pages, $perpage a page number, $curpage the current page, $mpurl url, $page = 10 display a few pagination
*
*/
function multi ($num, $perpage, $curpage, $mpurl, $page =
Originally published a Separate page class from the database, recently used when found that sometimes the search is too large, the use of the URL to pass parameters, may have a certain impact or known bugs, this time to do some expansion, while
Copy Code code as follows:
Open an XML file for storing messages
$guestbook = simplexml_load_file (' Db/guestbook.xml ');
foreach ($guestbook->thread as $th)//loop read every thread label in XML data
{
echo " title:". $th->title.
Requirements: such as the development of an extension called Heiyeluren, the extension of a function heiyeluren_test (), enter a string, function return: Your input string:xxxxx.
Requirements: To understand C + + programming, familiar with PHP
Some single worth cases call a method we often write this$a = A:: getinstance ();$a->setcount (10);$a->showcount ();We can turn SetCount into a static method.Put a:: getinstance () into this methodThat's how we can write.A::setcount (10);Three lines
Realize packaging function ~ Easy and convenient! Compression is worse than WinRAR, but it doesn't matter. After all, just pack and do the download
Save yourself to the server to pack the site if the server is not their own more trouble to let
HTML section:
function Postrequest (strURL) {
var xmlHttp;
if (window. XMLHttpRequest) {//For Mozilla, Safari, ...
var xmlHttp = new XMLHttpRequest ();
}
else if (window. ActiveXObject) {//For Internet Explorer
var xmlHttp = new ActiveXObject
Let's start by understanding how to create this object in javascript:
Program code
var xmlHttp = new XMLHttpRequest ();
This simple code creates the XMLHttpRequest object in Mozilla, Firefox, Safari, Opera, and virtually all non-Microsoft browsers
Ajax.html
Program code
Copy Code code as follows:
compatible multi-browser Ajax Getting Started instance (Hyper-detailed note)
What to replace
ajax_show.php
Program code
Copy Code code as
Client code:
Copy Code code as follows:
Dynamic Display Time
Server-side code:
Copy Code code as follows:
Header ("Cache-control:no-cache,must-revalidate"); To cancel the settings for the
Copy Code code as follows:
Match the text, this is occasionally easy to use, but be careful that the character contains \e
$str = ' [A-z] ';
$str = preg_replace ('/\g[a-z]\e/', ', ', $str);
Echo $str; Print empty, all replaced,
PHP has many file system-related functions that not only open files, but also display content, move files, and other features in the directory, and many people even use PHP to develop internet-based file Explorer.
The following script sample can
Another advantage of PHP functionality is its ability to invoke existing Java object methods. This feature allows you to integrate PHP into existing java-based applications. This feature is especially fashionable if you are promoting PHP in your
Auto Load Class
Many developers write object-oriented applications, creating a PHP source file for each class definition. A very large
The trouble is having to write a long list of included files at the beginning of each script (one file per class).
Copy Code code as follows:
Login
Username:
Password:
cookie save time:
Browser process
Save 1 days
Save 30 days
Save 365 days
Copy Code code as follows:
Copy Code code as follows:
0%
Flush ();
For ($i =0 $i {
$width = $i * 4;
echo "";
For ($j =0 $j {
To demonstrate the effect of the progress bar, an empty loop is executed here
}
Flush ();
}
?>
The following is the program code:
Copy Code code as follows:
function uhtml ($STR)
{
$farr = Array (
"/\s+/",//filter Excess blank
Filtering etc. may introduce malicious content or maliciously change the display layout of the code, if
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