library/run.php

<?php

$request  = $_SERVER["REQUEST_URI"];

$params = str_replace(‘/basketball/‘,‘‘,$request);

if( empty( $params ) ) {    header(‘HTTP/1.1 503 Service Unavailable.‘, TRUE, 503);    echo ‘Your view folder path does not appear to be set correctly. Please open the following file and correct this: ‘.SELF;    exit(3); // EXIT_CONFIG}if( strpos( $params ,‘/‘) ) {    $params = explode(‘/‘,$params);    $control = $params[0];    $action = $params[1];    if( strpos($action , ‘%EF%BC%9F‘) || strpos( $action , ‘?‘ ) ) {        $explode = strpos($action , ‘%EF%BC%9F‘) ? ‘%EF%BC%9F‘ : ‘?‘;        $action = explode( $explode , $action);        $action = $action[0];    }} else {    $control = $params;    $action = ‘index‘;}$curPath =  CONTROL_PATH.DIRECTORY_SEPARATOR.$control.‘.control‘.FILE_EXT;

if( !file_exists($curPath) ){    header(‘HTTP/1.1 503 Service Unavailable.‘, TRUE, 503);    echo ‘Your view folder path does not appear to be set correctly. Please open the following file and correct this: ‘.$control.‘.control.php‘;    exit(3); // EXIT_CONFIG}

require LIBRARY_PATH.DIRECTORY_SEPARATOR.‘mysql‘.DIRECTORY_SEPARATOR.‘mysql‘.FILE_EXT;

require LIBRARY_PATH.DIRECTORY_SEPARATOR.‘control‘.FILE_EXT;

require FUNCTION_PATH.DIRECTORY_SEPARATOR.‘application‘.FILE_EXT;

require FUNCTION_PATH.DIRECTORY_SEPARATOR.‘language‘.FILE_EXT;

require $curPath;

if ( !class_exists ( $control ) )  {    header(‘HTTP/1.1 503 Service Unavailable.‘, TRUE, 503);    echo ‘Your view folder path does not appear to be set correctly. Please open the following file and correct this: ‘.$control.‘.control.php‘;    exit(3); // EXIT_CONFIG}$obj = new $control;

if( !method_exists( $control, $action ) ) {    header(‘HTTP/1.1 503 Service Unavailable.‘, TRUE, 503);    echo ‘Your view folder path does not appear to be set correctly. Please open the following file and correct this: ‘.$control.‘.control.php function:‘.$action;    exit(3); // EXIT_CONFIG}

define(‘USER_TOKEN‘,‘user_token‘);

$obj->$action();
时间: 2024-10-14 11:57:33

library/run.php的相关文章

pexpect库run函数的使用详解

前面我们pexpect库的spawn类的方法,在pexpect库中,除了spawn类以外,还有其他工具和类.现在来看在pexpect库中有哪些其他工具和类. 其他工具和类 1.run函数,是pexpect库中用于运行简单命令的基本函数.主要用于快速运行不用与其交互或仅需很少交互的程序. 2.它是简化版的spawn类. 3.直接返回子程序运行的输出信息. 4.commond主要是用于提供一个单独的命令行,或者带参数的命令行.在run函数中其他相关参数和spawn类的构造方法的参数基本是一样的. 5

msmtp在RHEL6.5下的安装

1.解压 [[email protected] ~]# tar -jxvf msmtp-1.4.32.tar.bz2 2.配置 [[email protected] ~]# cd msmtp-1.4.32 [[email protected] msmtp-1.4.32]# ./configure --prefix=/usr/local/msmtp --sysconfdir=/usr/local/msmtp/etcchecking build system type... x86_64-unkno

PHP-redis英文文档

作为程序员,看英文文档是必备技能,所以尽量还是多看英文版的^^ PhpRedis The phpredis extension provides an API for communicating with the Redis key-value store. It is released under the PHP License, version 3.01. This code has been developed and maintained by Owlient from November

SQLSERVER Account Weak Password Detection Automatic By System API

catalog 1. DB暴力破解方式 2. DB弱密码入侵向量 3. SQLAPI++ 4. C++ ADO 5. C++ ODBC 6. tiodbc - TinyODBC C++ Wrapper for ODBC API 7. 基于API调用的自动化检测 1. DB暴力破解方式 0x1: 利用存储过程 核心思想,就是存储帐号密码的master.dbo.sysxlogins表和密码比较存储过程pwdcompare alter proc p_GetPassword2 @username sys

SignalR 的跨域支持

How to establish a cross-domain connection Typically if the browser loads a page from http://contoso.com, the SignalR connection is in the same domain, athttp://contoso.com/signalr. If the page from http://contoso.com makes a connection to http://fab

JavaScript Patterns 5.5 Sandbox Pattern

Drawbacks of the namespacing pattern • Reliance on a single global variable to be the application’s global. In the namespacing pattern, there is no way to have two versions of the same application or library run on the same page, because they both ne

C++开源库集合

| Main | Site Index | Download | mimetic A free/GPL C++ MIME Library mimetic is a free/GPL Email library (MIME) written in C++ designed to be easy to use and integrate but yet fast and efficient. It is based on the C++ standard library and heavily us

CentOS7 Cloudera Manager6 完全离线安装 CDH6 集群

本文是在CentOS7.4 下进行CDH6集群的完全离线部署.CDH5集群与CDH6集群的部署区别比较大. 说明:本文内容所有操作都是在root用户下进行的. 文件下载 首先一些安装CDH6集群的必须文件要先在外网环境先下载好. Cloudera Manager 6.3.0 CM6 RPM:https://archive.cloudera.com/cm6/6.3.0/redhat7/yum/RPMS/x86_64/ 需要下载该链接下的所有RPM文件,保存到cloudera-repos目录下. A

友盟分享到QQ空间 JAR问题The library &#39;SocialSDK_QQZone_2.jar&#39; contains native libraries that will not run on t

The library 'SocialSDK_QQZone_2.jar' contains native libraries that will not run on the device. The following libraries were found: - assets/libwbsafeedit.so 点击Run As 获取签名打包的时候就报错,解决办法: 在Eclipse中点击Windows---Preference,在Android项下面的Build项目下:去掉第二个和第三个勾选