Phpserialize is a PHP variable serialization and deserialization function implemented in Python. In other words, in the python environment, phpserialize can be used to conveniently process the serialized text in PHP and convert it into a variable
1. Create a function
The function creation syntax is as follows:
Function func ($ arg_1, $ arg_2,..., $ arg_n)
{
...
}
Any valid PHPCodeYou can define other functions or classes in a function.
In PHP, you do not need to declare a
"+" Operator and array_merge (): ArrayArray_merge(Array array1, array array2 [, array...])Multiple Arrays can be merged, but there is a small difference in the use process.
Array_merge is described in the reference manual as follows:
Array_merge
The libxml2-dev needs to be installed, although we have long installed libxml2
Sudo apt-Get install libxml2 (press the tab key)
The following information is displayed:
Libxml2 libxml2-dev libxml2-headers libxml2-utils
Here you need to install
An error is reported after make is executed:
/Usr/local/zlib/lib/libz. A: cocould not read symbols: Bad Value
Make: *** [libphp5.la] Error 1
Solution:
CD zlib-1.2.3 //EnterZlibDirectoryCflags = "-O3-FPIC"./configure //Use64Compile the
The file name is garbled:
$ UA = $ _ server ['HTTP _ user_agent ']; If (preg_match ('/MSIE/', $ UA) {$ file_name = str_replace (' + ', '% 20', urlencode ($ file_name ));}
The file contains Chinese characters:
Headers ('content-type:
The ob_start () function is used to open the buffer. For example, if there is output before the header () function, including carriage return, space, line feed, and header hadAll ready sendBy "error, You can first use ob_start () to open the buffer
Today, I applied for a free PHP space on 0fees.net, and then added the csdn blogArticleCaptureProgramAnd the csdn blog user crawler program was put on, although the space is foreign, but the speed is still OK.
Now that ready-made space is
Copyright statement: original works can be reproduced. During reprinting, you must mark the original publication, author information, and this statement in hyperlink form. Otherwise, legal liability will be held. Http://blog.csdn.net/mayongzhan-ma
Copyright statement: original works can be reproduced. During reprinting, you must mark the original publication, author information, and this statement in hyperlink form. Otherwise, legal liability will be held. Http://blog.csdn.net/mayongzhan-ma
Key: Check whether you install PHP in static mode or DSO in PHP. The former is libphp4.a and the latter is directly generated.
Libphp4.so
Supplement:
PHP often works with Apache Web ServersUsed for Linux/UNIX platforms. When we install PHP in
We know that in PHP, foreach can easily perform iterative operations on iterative structures (such as arrays and objects:
foreach( $array as $elem){var_dump($elem);}
foreach($obj as $key=>$value){echo "$key=>$value".PHP_EOL;}
So we thought: What
Http://www6.webng.com/seaboat/article.asp? Id = 660
/**** Two-dimensional arrays are sorted by specified columns.* @ Param $ arr_data original array* @ Param $ field specifies the column* @ Param $ descending: whether to downgrade (the default
I always think that PHP runs very quickly, especially after Zend engine acceleration. But PHP still has the possibility of acceleration, you know?
Everything starts with how to optimize PHP compilation.
Try to use the special compilation parameter-
Company server, PHP version: 4.3.8
PHP fatal error: allowed memory size of 8388608 bytes exhausted (tried to allocate 44 bytes) in ************ on line *******
Analysis:
PHP. ini sets 8 MB memory by default. This error occurs because the
I used to override the static function of the subclass, so I wrote a test code section. The Code is as follows:
Class
{
VaR $ A = 'I/'m ';
Function write ()
{
Echo 'I can be overriden! ';
}
Static function no_write ()
{
Echo 'Can I be overriden?
In Linux, I have installed Apache + MySQL + PHPSet the following path in the httpd. conf file:Alias/web/"/opt/xoops-2.0.14/htdocs /"Options all MultiviewsAllowOverride noneOrder allow, denyAllow from allDocumentRoot "/var/www/html"Options
Linux: install Apache and PHP
1. Apache
Download the source package of Apache for Linux from the following page: http://www.apache.org/dist/httpd/; save it to the/home/XX directory. XX is a self-built folder. I created a WJ folder.
Command list:
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