PHP has a lot of functions similar to the function, but there are subtle differences, as this article all the analysis of the Is_null,empty,isset three functions, no effort, it is not easy to really understand the amount! below to follow the
Environment: Linux, Apache2, PHP5
Problem: Opening phpMyAdmin The following error occurred:
Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PH P installation properly.
The
Today in the use of Smarty to make a website, because there is such a need include file= "dynamic Path", which need to use variables in the value of file, try to solve a half-day finally, I think the method is more ingenious, the former use of the
PHP string processing function Summary, these are the system comes with the PHP string processing function.
Addcslashes-adds a backslash escape character for some characters inside a stringaddslashes-characters inside a string are escaped in the
In PHP, there are two functions that are related to the escape of a string, they are addslashes and stripslashes respectively.
Addslashes ($string) to add a backslash (\) before the specified predefined character to prepare the appropriate string
Use PHP to get QQ Avatar two ways to share.
Method One:
Method Two:
The difference between the two methods:The advantage of method one is that you can output the original picture of the Avatar, if your avatar is animated GIF, then the output is
1. The server is custom-made, do not know the corresponding CentOS version;
2. PHP is compiled by itself, and the server does not keep the corresponding version of the source code, through/pathto/php-v find the PHP version number, and then wget to
The following are some of the experiences that we end up with when we develop a project at Shun Yi Network.
When rendering the page output.
1.render outputs the contents of the parent template, and embeds the rendered content into the parent
Original link: http://blogs.msdn.com/b/scottdensmore/archive/2004/05/25/140827.aspx
Although this article is not written by me, I totally agree with the point in the article. Brian button is probably one of the most experienced people I know. I'm
Have you ever thought: To compress the JS file, convert the JS file into a PNG image, and then use the Getimagedata () function in the canvas control to re-read the image into a JS file. I published here yesterday in the JS file fast loading of the
The following are ourShun Yi Network
Some of the experience of the company's development project
We can use renderpartial to access some of the view files stored in the Views folder of different controllers.
In Yii1.1.3, we use the double slash "//"
The PHP smarty template engine has two ways of data looping, namely foreach and section loops. The following one by one describes these two types of loops.
(1) Smarty foreach Loop
foreach is used to iterate through an associative array like
Until recently, to do a web thief program only to find that File_get_content is completely unable to meet the demand. I think that when reading remote content, File_get_content is not as good as curl, except that it's easier to use than curl.
Main
It is also able to optimize scripts to speed up their execution. Using Eaccelerator can reduce the load on the server and increase the execution time of the PHP code.
Eaccelerator configuration options:Copy the Code code as
A while ago tried to use a sphinx, a full-text retrieval system that can be easily called by various languages (PHP/PYTHON/RUBY/ETC). Most of the information on the Internet is installed in the Linux environment, of course, as a production
Using the Linux system to do Web server, local modification of JS or CSS to the server will often have no effect on the situation, this is the Linux server cache problem, resulting in local download JS or old version, the following to share a
Copy the following code directly, create a new file called thumbnailimage.php, the file name should not be capitalized, the following code to copy in:
Copy the Code code as follows:
Define (' Max_img_size ', 100000);
Supported Image typesDefine
Now the Internet environment is becoming more and more serious, security, has been a program developer and webmaster of a problem, how to choose an easy-to-use, secure program, how to build a secure server environment, has been the vast number of
PHP to open the OpenSSL method, in most cases, OpenSSL is not open, to enable the need to make the following simple settings
windows open method:
1: first check the php.ini; Extension=php_openssl.dll exists, if present, remove the previous
PHP One-dimensional arrays can be sorted by sort (), Asort (), Arsort () and other functions;
The ordering of PHP two-dimensional arrays needs to be customized.
The following function is to sort a given two-dimensional array according to the
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