/www/wwwroot/zhongshiminan/main/src/Data.php
public function push()
{
$key = Dever::input('key', 'banner');
$total = Dever::input('total', 5);
// Dever::debug($dataModule);
// 如果 $total 为 -1,设置为一个较大的数或者去掉 LIMIT
return Dever::load('page/lib/data')->get($key, $key, $total);
}
# 获取分类信息
public function getCateInfo()
{
$info = $this->getNewsInfo();
$cate = Dever::input('cate', 1);
$info = Dever::db('content/news_cate')->find(array('id' => $info['cate_id']));
return $info;
}
/www/wwwroot/zhongshiminan/php/dever/vendor/dever-main/framework/src/Dever/Loader/Import.php
} else {
if (is_array($param) && $param) {
if (isset($param[0]) && is_array($param[0])) {
foreach ($param[0] as $k => $v) {
Input::set($k, $v);
}
}
$this->data = call_user_func_array(array($this->class, $method), $param);
} else {
$this->data = call_user_func(array($this->class, $method), $param);
}
}
if ($plugin && isset($plugin['end'])) {
Import::load($project['name'] . '/plugin/' . $plugin['end'], $this->data);
}
Debug::reflection($this->class, $method);
if ($this->api) {
/www/wwwroot/zhongshiminan/php/dever/vendor/dever-main/framework/src/Dever/Loader/Import.php
} else {
if (is_array($param) && $param) {
if (isset($param[0]) && is_array($param[0])) {
foreach ($param[0] as $k => $v) {
Input::set($k, $v);
}
}
$this->data = call_user_func_array(array($this->class, $method), $param);
} else {
$this->data = call_user_func(array($this->class, $method), $param);
}
}
if ($plugin && isset($plugin['end'])) {
Import::load($project['name'] . '/plugin/' . $plugin['end'], $this->data);
}
Debug::reflection($this->class, $method);
if ($this->api) {
/www/wwwroot/zhongshiminan/php/dever/vendor/dever-main/framework/src/Dever/Loader/Import.php
$this->call($method, $project);
$db->commit();
} catch (\Exception $e) {
$db->rollBack();
$data = $e->getTrace();
Debug::trace($data);
throw new Exceptions($data[0]['args'][1] . '['.$data[0]['args'][2].':'.$data[0]['args'][3].']');
}
} else {
$this->call($method, $project);
}
}
/**
* ai
*
* @return mixed
*/
protected function ai($project)
{
/www/wwwroot/zhongshiminan/php/dever/vendor/dever-main/framework/src/Dever/Loader/Import.php
protected function loadClass()
{
$this->manage();
if (strpos($this->key, '!')) {
$this->key = str_replace('!', '.' . self::MAIN, $this->key);
}
if (strpos($this->key, '.')) {
$this->loadMethod();
} elseif (strpos($this->key, '-')) {
$this->loadModel();
} else {
$this->class = Library::get()->loadClass($this->key);
$this->data =& $this->class;
}
}
/**
* loadModel
/www/wwwroot/zhongshiminan/php/dever/vendor/dever-main/framework/src/Dever/Loader/Import.php
*/
protected function getData($status)
{
if (strpos($this->key, 'http://') !== false) {
$this->loadServer($this->key);
}
if ($status == true || empty($this->data)) {
$this->data = array();
$this->loadClass();
}
$state = false;
}
/**
* loadServer
*
* @return mixed
*/
/www/wwwroot/zhongshiminan/php/dever/vendor/dever-main/framework/src/Dever/Loader/Import.php
*
* @return mixed
*/
protected function data($status)
{
$cache = $this->cache();
if ($cache) {
$this->data = $cache;
} else {
$this->getData($status);
$this->cache($this->data);
}
}
/**
* getData
*
* @return mixed
*/
protected function getData($status)
/www/wwwroot/zhongshiminan/php/dever/vendor/dever-main/framework/src/Dever/Loader/Import.php
}
/**
* get
*
* @return mixed
*/
protected function get($param = array(), $attr = '')
{
$this->data($this->status($param));
if ($attr) {
if (isset($this->data[$attr])) {
return $this->data[$attr];
}
return false;
}
return $this->data;
}
/www/wwwroot/zhongshiminan/php/dever/vendor/dever-main/framework/src/Dever/Loader/Import.php
*/
public static function load()
{
list($key, $attr, $param) = self::argc(func_get_args());
if (empty(self::$instance[$key])) {
self::$instance[$key] = new self($key);
}
return self::$instance[$key]->get($param, $attr);
}
/**
* argc
* @param array $param
*
* @return array
*/
public static function argc($argv)
{
/www/wwwroot/zhongshiminan/php/dever/vendor/dever-main/framework/dever.php
* @param array $param
*
* @return mixed
*/
public static function __callStatic($name, $param = array())
{
if (isset(self::$register[$name])) {
$class = 'Dever\\' . self::$register[$name][0];
$method = self::$register[$name][1];
return call_user_func_array(array($class, $method), $param);
} elseif (isset(self::$define[$name])) {
if (is_array(self::$define[$name])) {
$class = self::$define[$name][0];
$method = self::$define[$name][1];
} else {
$class = self::$define[$name];
$method = $name;
}
return call_user_func_array(array($class, $method), $param);
/www/wwwroot/zhongshiminan/data/compile/zhongshiminan/main/pc/index.cmp.php
<?php $data['main/data.config']=Dever::load('main/data.config') ?>
<?php $data['main/data.menu']=Dever::load('main/data.menu') ?>
<?php $data['main/data.mobile_menu']=Dever::load('main/data.mobile_menu') ?>
<?php $data['main/data.push?key=banner']=Dever::load('main/data.push?key=banner') ?>
<?php $data['main/data.push?key=investor&total=-1']=Dever::load('main/data.push?key=investor&total=-1') ?>
<?php $data['main/data.push|key=investor&total=1']=Dever::load('main/data.push', array (
'key' => 'investor',
'total' => '1',
)) ?>
<?php $data['main/data.push?key=business&total=-1']=Dever::load('main/data.push?key=business&total=-1') ?>
<?php $data['main/data.push|key=business&total=1']=Dever::load('main/data.push', array (
'key' => 'business',
'total' => '1',
)) ?>
<?php $data['main/data.push?key=about&total=-1']=Dever::load('main/data.push?key=about&total=-1') ?>
<?php $data['main/data.push|key=about&total=1']=Dever::load('main/data.push', array (
'key' => 'about',
'total' => '1',
)) ?>
<?php $data['main/data.push?key=contact&total=-1']=Dever::load('main/data.push?key=contact&total=-1') ?>
/www/wwwroot/zhongshiminan/php/dever/vendor/dever-main/framework/src/Dever/Template/Compile.php
*/
public function get()
{
if ($this->update == false && is_file($this->file)) {
ob_start();
if (isset($this->data) && $this->data && is_array($this->data)) {
//parse_str(http_build_query($this->data));
extract($this->data);
}
require $this->file;
$content = ob_get_contents();
if (Config::get('host')->domain) {
$content = $this->domain($content);
}
if (Config::get('host')->uploadRes) {
$content = Url::uploadRes($content);
}
ob_end_clean();
return $content;
} elseif ($this->update == false) {
/www/wwwroot/zhongshiminan/php/dever/vendor/dever-main/framework/src/Dever/Template/View.php
*
* @return \Dever\Template\View
*/
public function compile()
{
$this->layout();
$this->compile = new Compile($this->file, $this->assets, $this->template, $this->project, $this->path, $this->data);
$this->content = $this->compile->get();
if ($this->content || $this->content !== false) {
$this->front($this->content, true);
return $this->content;
}
$this->front($this->compile->getContent(), false);
return $this->template();
}
/www/wwwroot/zhongshiminan/php/dever/vendor/dever-main/framework/src/Dever/Template/View.php
*/
public function runing()
{
$key = Uri::url();
$this->content = $this->cache($key);
if ($this->content) {
return $this->content;
}
$this->assets()->compile();
$this->cache($key, $this->content);
return $this->content;
}
/**
* cache
*
* @return mixed
*/
/www/wwwroot/zhongshiminan/php/dever/vendor/dever-main/framework/src/Dever/Routing/Route.php
$state = self::def($uri);
if (!$state && !self::api($uri)) {
$file = Uri::file();
if (isset(Config::get('template')->relation[$file])) {
$file = array($file, Config::get('template')->relation[$file]);
}
$this->content = $this->cache($uri);
if (!$this->content) {
$this->content = View::getInstance($file)->runing();
$this->cache($uri, $this->content);
}
$this->html = true;
}
$this->end($uri);
return $this;
}
/www/wwwroot/zhongshiminan/php/dever/boot.php
|--------------------------------------------------------------------------
*/
$route = new Dever\Routing\Route;
/*
|--------------------------------------------------------------------------
| route run and out
|--------------------------------------------------------------------------
*/
if (!defined('DEVER_DAEMON')) {
$route->runing()->output();
}
$route->close();
$route = null;
}
/www/wwwroot/zhongshiminan/boot.php
<?php
$_SERVER['DEVER_SERVER'] = 'localhost';
define('DEVER_PROJECT', 'zhongshiminan');
define('DEVER_PROJECT_PATH', dirname(__FILE__) . DIRECTORY_SEPARATOR);
if (defined('DEVER_PACKAGE')) {
include(DEVER_PROJECT_PATH.'/php/dever_package/'.DEVER_PACKAGE.'/index.php');
} else {
include(DEVER_PROJECT_PATH.'/php/dever/boot.php');
}
/www/wwwroot/zhongshiminan/main/index.php
<?php
define('DEVER_APP_NAME', 'main');
define('DEVER_APP_LANG', '基础设置');
define('DEVER_APP_PATH', dirname(__FILE__) . DIRECTORY_SEPARATOR);
define('DEVER_MANAGE_ORDER', 98);
define('DEVER_MANAGE_ICON', 'glyphicon glyphicon-tower layui-icon-component');
include(DEVER_APP_PATH . '../boot.php');
/www/wwwroot/zhongshiminan/index.php
<?php
include('main/index.php');