【发布时间】:2011-09-22 15:31:43
【问题描述】:
我们都知道 xHTML/CSS 和 JS 的缩小和压缩有利于大流量网站。
看看下面的代码:
include("template.funcs.php");
include("country-redirect.php");
if(($country=='PL')||($country=='POL'))
{
header('Location: index_pol.php');
exit();
}
$include_path = './global_php/';
$page = "couture";
include $include_path."shop.inc.php";
$movie_num = 1 ;
现在看看缩小版:
include("template.funcs.php");include("country-redirect.php");
if(($country=='PL')||($country=='POL')){header('Location: index_pol.php');
exit();}
$include_path='./global_php/';$page="couture";include $include_path."shop.inc.php";
$movie_num=1;
您认为哪个更快 - 一般来说,我也想开始缩小我的编程,小的 var 和字符串名称,如 $a 而不是 $apple,并尝试删除尽可能多的额外字符。 PHP 编译器会喜欢压缩的块还是间隔的块?
【问题讨论】:
标签: php compression minify