We will introduce how Apache and PHP work.Suppose there are 1000 people at the same time request PHP site, these requests to the Apache server, this time the Apache server is how to work? 1. Create 1000 processes to process 1000 requests? 2. Create
1,eaccelerator_put ($key, $value, $ttl =0) will $value to $key as the key name in the cache (PHP4 support for the type of image, see the source as if the Zend2 is not supported), $ttl is the life cycle of this cache, the unit is the second, Omitting
What is a two-dimensional code? Two-dimensional code is a two-dimensional barcode, can be the URL, text, photos and other information through the corresponding encoding algorithm compiled into a block-shaped barcode pattern, mobile phone users can
When the PHP blank page appears, how to view the PHP report error message?Here's how:One, by configuring the parameters in the php.ini to set the error level of PHP can add a line in the appropriate position in php.ini error_reporting = e_all Note:
Booleans is used to represent the concepts of true and false. They is most often used for testing if a statement is true or false and they ' ll play a bigger role when we discuss Logica L Expressions. Note that there is a difference between Boolean
Sometimes when you want to download the link directly instead of on the page, you need to force header information to be set.Share a piece of PHP function implementation code that does not produce garbled characters, implement the mandatory download
PHP Application GeoIP Library Example TutorialNote that Maxmind is the provider of the GEOIP database and also provides sample and API documentation for many languages. For example, PHP, and PHP GeoIP library is very different, including the use of
Example, PHP gets the Linux server status code.
function Get_used_status () {
$fp = Popen (' top-b-N 2 | grep-e "^ (cpu| mem| Tasks) "'," "R");//Get a moment of system CPU and memory usage
$rs = "";
while (!feof (
/*
* Precise time interval function
* $time release time as 1356973323
* $STR output format such as y-m-d h:i:s
* The second half of the year is 15552000, 1 years is 31104000, here in half a year time
*/
Jphp is a compiler similar to javac that compiles PHP source code into a JVM bytecode compiler. Then it was implemented to let the PHP program run on the Java Virtual machine. It supports many of the php5.3+ features. Jphp is similar to JRuby and
The Chinese and English mix counts, intercepts, does not use the custom function, but uses PHP's MB extension, uses the original ecology PHP function to handle the string interception easily.First, the following functions are used to intercept
Jphp is a PHP implementation for Java virtual machines that supports many features of PHP (5.3+). Jphp is responsible for compiling the PHP source code into the JVM bytecode so that it can run on the JVM, similar to the implementations of JRuby,
1, unable to pass the variable get,post,session in the latest PHP version, the auto global variable is closed, so the variables to be submitted from the upper side are to be obtained using $_get[' foo '],$_post[' foo '],$_session[' foo '. Of course,
To get the field information in PHP, you can use the following function : Mysql_fetch_field () Mysql_num_fields () Mysql_list_fields () mysql_field_flags () MySQL _field_len () Mysql_field_name () Mysql_field_type () mysql_field_table ()The
The Web server executes a PHP script, which sometimes takes a long time to return to the execution results, and the subsequent script waits for a long period to continue. If you want to implement the next step simply by triggering the execution of
Use the Addslashes function in PHP to prevent SQL injection.Although many PHP programmers in the country still rely on addslashes to prevent SQL injection, it is recommended to strengthen Chinese to prevent SQL injection check.The problem with
Example, PHP gets last week, this week, last month, this month, this quarter, last quarter.
Date_default_timezone_set (' PRC ');
Date ("Y-m-d h:i:s", Strtotime ("+2 Year"));
Date ("Y-m-d h:i:s", Strtotime ("+2
traverse all files and folders under a folder
function List_dir ($dirpath) {
if ($dirpath [strlen ($dirpath) -1]!= "\") {$dirpath. = ' \ ';}
static $result _array=array ();
if (Is_dir ($dirpath)) {
$dir
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