First turn on web sharing.
Configuration
httpd.conf Add PHP extension/etc/apache2/httpd.conf
If ulimit_max_files= "ulimit-s-n ' ulimit-h-n '" error appears
Need to remove
/usr/sbin/apachectl inside Ulimit-s-n ' ulimit-h-n
Restart Apache
Brew
Mysql_num_rows and COUNT (*) can count the total, that can be better?
Or
When do you use Num_rows and COUNT (*) separately?
An intuitive contrast
Test data:
Number of articles: 139,764
Data table Size: 500M
Results:
Fetch_num_rows spents: 35.2723
Sample1
Copy CodeThe code is as follows:
What if I use a function like iconv that has three parameters? If written as:
Sample 2
Copy CodeThe code is as follows:
An error message is displayed when you execute it.
Therefore, the study will find
Copy CodeThe code is as follows:
/*
Compress multiple CSS files into one and the cache for an hour.
Use the same code for Javascript, but replace below ' text/css ' with ' text/javascript ' and of course make sure you include . js files instead of.
PHP Code:
Copy CodeThe code is as follows:
/*/flashservices/services/catalog.php */
Class Catalog {
var $products _array = Array ();
Constructor:contains the list of methods available to the gateway
function Catalog () {
$this->methodtable = Array
Do not know the performance of the program will not affect very much!
Copy the Code code as follows:
Ignore_user_abort ();//switch off the browser, PHP script can continue to execute.
Set_time_limit (0);//Set_time_limit (0) allows the program to
Copy CodeThe code is as follows:
/**
* Bridging mode
*
* Separate the abstract part from its implementation and use them to change independently
*/
Abstract class Implementor
{
Abstract public function operation ();
}
Class Concreteimplementora
Copy CodeThe code is as follows:
function Array_add ($a, $b) {
Gets the intersection of two arrays based on the key name
$arr =array_intersect_key ($a, $b);
Iterates through the second array if the key name does not exist with the first array,
Copy CodeThe code is as follows:
/**
* Prototype mode
*
* Use the prototype instance to specify the kind of object to create. and create new objects by copying this prototype
*
*/
Abstract class Prototype
{
Private $_id = null;
Public function
Copy CodeThe code is as follows:
#!/usr/local/bin/php-q
Author:freemouse
Here is the description.
Print ("This program is used to merge 2 640x480-sized. \ n");
Print ("Picture, and convert it to a picture of 400x300 size \ n");
Print ("required to
Session_unset ()
Frees all $_session variables that are currently created in memory, but does not delete the session file and does not release the corresponding session
Id
Session_destroy ()
Delete the current user's session file and release
1: Get the File object
2: Read 2 binary data
3: Simulate HTTP requests, send data (usually troublesome here)
Sending data using the Sendasbinary method of the XMLHttpRequest object under Forefox;
4: Perfect Realization
Problems encountered
Currently
curl_setopt
(PHP 4 >= 4.0.2)
curl_setopt--Set an option for the curl call
Describe
BOOL curl_setopt (int ch, string option, mixed value)
The curl_setopt () function sets options for a curl session. The option parameter is the setting that
I am an ASP programmer, this is the first time to write a PHP program, a little bit of experience sent up to share
Copy CodeThe code is as follows:
$ip 2id= Round (rand (600000, 2550000)/10000); The first method, the direct generation of
$ip 3id=
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