Exemple #1
0
<?php

//应用zj_php框架
require_once '../../zj_php.php';
//设置应用路径
setC("APP_PATH", dirname(__FILE__));
setC("TPL_PATH", getC("APP_PATH") . "/Tpl/");
//设置 APP URL
$arr1 = explode("index.php", $_SERVER["SCRIPT_NAME"]);
setC("APP_URL", $arr1[0]);
setC("APP_URL_ACTIONTAG", "");
//添加应用自动加载类路径
add_autoload_path(getC("APP_PATH") . "/Action/");
//添加应用配置文件
add_app_config(getC("APP_PATH") . "/Conf/App1_Conf.php");
//加载自定义函数
require_once "./Conf/AppFunction.php";
//执行请求
Runtime::doQuery();
Exemple #2
0
<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
error_reporting(7);
//set_magic_quotes_runtime(0);
require_once 'Common/Config.inc.php';
require_once 'Common/Common.inc.php';
require_once 'Common/Function.inc.php';
require_once 'Common/Runtime.inc.php';
//添加自动加载Class路径
add_autoload_path(ZJ_PHP_PATH . "Lib/", true);
add_autoload_path(ZJ_PHP_PATH . "Extend/", true);
$_POST = Add_S($_POST);
$_GET = Add_S($_GET);
$_COOKIE = Add_S($_COOKIE);
// 可以用 $q_xx 直接访问 $_REQUEST["aa"];
foreach ($_REQUEST as $key => $value) {
    $name1 = "q_" . $key;
    ${$name1} = $value;
}
//请求的Action和Method,在Runtime的Query对其赋值。
$_QueryAction = "";
$_QueryMethod = "";
ob_start();
//JS跨域
if (getC("CORS")) {
    @header('Access-Control-Allow-Origin: ' . getC("CORS"));
}
Exemple #3
0
<?php

//应用zj_php框架
require_once './zj_php/zj_php.php';
//设置应用路径
setC("APP_PATH", dirname(__FILE__));
setC("TPL_PATH", getC("APP_PATH") . "/_Tpl/");
//设置 APP URL
$arr1 = explode("index.php", $_SERVER["SCRIPT_NAME"]);
setC("APP_URL", $arr1[0]);
setC("APP_URL_ACTIONTAG", "a/");
//添加应用自动加载类路径
add_autoload_path(getC("APP_PATH") . "/_Action/", true);
add_autoload_path(getC("APP_PATH") . "/_Business/", true);
add_autoload_path(getC("APP_PATH") . "/_Business/Entity/", true);
add_autoload_path(getC("APP_PATH") . "/_Server/", true);
add_autoload_path(getC("APP_PATH") . "/_Lib/", true);
add_autoload_path(getC("APP_PATH") . "/_Factory/", true);
//添加应用配置文件
add_app_config(getC("APP_PATH") . "/_Conf/app.config.php");
add_app_config(getC("APP_PATH") . "/_Conf/" . strtolower(getC("APP_STATE")) . ".config.php");
//加载自定义函数
//执行请求
Runtime::doQuery();