//用这个header指令来解决URL重写产生的404 header
header(‘HTTP/1.1 200 OK’);
// 页面没找到
//用这个header指令来解决URL重写产生的404 header
header(‘HTTP/1.1 200 OK’);
// 页面没找到
function text($str) {
preg_replace(‘/a/’, ‘z’, $str);
preg_replace(‘/b/’, ‘z’, $str);
DOM function 即文档对象模型函数,属于比较底层的XML操作,跟C#的XML操作一样,无论写还是读一个XML要写比较多的代码。
对xml的分析主要就是sax和dom方式
sax方式效率高,dom方式比较直观,现在也更流行。
Author: Eric Higgins, Google Webmaster
Recommended experience: Beginner to intermediate PHP knowledge
PHP is a very popular scripting language, used on many popular sites across the web. In this article, we hope to help you to improve the performance of your PHP scripts with some changes that you can make very quickly and painlessly. Please keep in mind that your own performance gains may vary greatly, depending on which version of PHP you are running, your web server environment, and the complexity of your code.