Home  >  Article  >  Backend Development  >  Three "soft" tricks to speed up your PHP website (1)_PHP Tutorial

Three "soft" tricks to speed up your PHP website (1)_PHP Tutorial

WBOY
WBOYOriginal
2016-07-15 13:25:28888browse

With the popularization of the Internet, websites have penetrated into every industry. However, because the cost of dedicated lines is now unaffordable for many companies and individuals, shared bandwidth has become the best option for many websites. Although the cost was reduced, a new problem soon appeared, that is, the speed of the shared bandwidth was very slow, sometimes even unbearable. How to make your website faster has become a question that people are concerned about. The author will talk about some practical applications of soft methods based on personal practice, hoping to be helpful to readers.

The author uses the Linux operating system and the Apache+PHP website construction method.

Code optimization

Programmers usually need to have good programming habits and minimize the occurrence of redundant code. Now there are many tools that can complete this function. There are many weight-loss tools for reducing redundancy in general HTML documents, but there are not many such tools for PHP programs, but Zend Technologies' Zend Optimizer is a good code optimization tool that can be used for free from Zend Technologies' website. The use of Zend Optimizer is also very simple. Just decompress the downloaded ZendOptimizer-1[1].0.0-PHP_4.0.4-Linux_glibc21-i386.tar.gz file and copy the ZendOptimizer.so file to /usr/local /Zend/lib directory, then modify the php.ini document and add the following lines at the end:


www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/446690.htmlTechArticleWith the popularity of the Internet, websites have penetrated into every industry, but due to the dedicated line costs now, many companies and individuals It is unbearable, so shared bandwidth has become the best choice for many websites...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn