Example #1
0
<?php

require_once 'config.php';
//加入一个调试开关
if (array_key_exists('debug', $_GET)) {
    Config::$DEBUG = true;
}
if (!Config::$DEBUG) {
    header("Content-type: text/javascript; charset=utf-8");
    header("Cache-Control: no-cache, must-revalidate");
    // HTTP/1.1
}
/*
 * Tangram
 * Copyright 2009 Baidu Inc. All rights reserved.
 *
 * path: import.php
 * author: berg
 * version: 1.0
 * date: 2010/07/18 23:57:52
 *
 * @fileoverview * import.js的php版本
 * 接受一个f参数,格式和import.js相同,自动合并js并输出
 * 此外,本脚本支持引入一个包所有文件(其实也就是一个目录下的所有js文件,**不递归**)
 * IE下,get请求不能超过2083字节,请注意。
 */
$cov = array_key_exists('cov', $_GET) ? true : false;
$import = 'import.js';
function importSrc($cov)
{
    global $import;