HEX
Server: nginx/1.22.1
System: Linux VM-16-9-centos 3.10.0-1160.99.1.el7.x86_64 #1 SMP Wed Sep 13 14:19:20 UTC 2023 x86_64
User: www (1001)
PHP: 7.3.31
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/wwwroot/oa.sanjiangapp.com/bin/zdoocli
#!/usr/bin/env php
<?php
/**
 * The cli router file of xirangeps.
 *
 * @copyright   Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
 * @license     ZPL (http://zpl.pub/page/zplv12.html)
 * @author      Chunsheng Wang <chunsheng@cnezsoft.com>
 * @package     chanzhiEPS
 * @version     $Id$
 * @link        http://www.chanzhi.org
 */
error_reporting(E_ALL ^ E_NOTICE ^ E_STRICT);
define('RUN_MODE', 'shell');
date_default_timezone_set('Asia/Shanghai');

/* Judge the args. */
if($argc != 2) die('Usage: ' . basename(__FILE__) . " <request>\n");

/* Parse the request into params. */
$request = parse_url(trim($argv[1]));
$appName = substr(dirname($request['path']), strrpos(dirname($request['path']), '/') + 1);
$_SERVER['HTTP_HOST'] = $request['host'];
$_SERVER['SERVER_ADDR'] = getenv('SERVER_ADDR');
$_SERVER['SCRIPT_FILENAME'] = dirname(dirname(__FILE__)) . "/www/$appName/index.php";

/* Load the framework. */
chdir(dirname(dirname(__FILE__)));
include './framework/router.class.php';
include './framework/control.class.php';
include './framework/model.class.php';
include './framework/helper.class.php';
include './config/config.php';
    
/* Set the PATH_INFO variable. */
if($config->requestType == 'PATH_INFO')
{
    $path = pathinfo($request['path']);

    /* url like http://www.chanzhi.org/article-browse.html, PATH_INFO is 'article-browse.html'. */
    if(strpos($path['basename'], $config->requestFix))
    {
        $_SERVER['PATH_INFO'] = $path['basename'];
    }
    else 
    {
        /* url like http://www.chanzhi.org/xirang/article/, PATH_INFO is 'article'. */
        if(is_dir('./module/' . $path['basename']))
        {
            $_SERVER['PATH_INFO'] = $path['basename'];
        }
        /* url like http://www.chanzhi.org/xirang/, PATH_INFO is '/'. */
        else
        {
            $_SERVER['PATH_INFO'] = '/';
        }
    }
    $_SERVER['REQUEST_URI'] = $path['basename'];
}
else
{
    parse_str($request['query'], $_GET);
    $_SERVER['SCRIPT_NAME'] = $_SERVER['HTTP_HOST'] . 'index.php';
    $_SERVER['REQUEST_URI'] = isset($request['query']) ? $request['query'] : '';
}

/* Instance the app and run it. */
$app = router::createApp($appName);

$common = $app->loadCommon();
$app->parseRequest();
$app->loadModule();