#var_dump($article_json_news);
$content = $article_json['content'];
$title = $article_json['title'];
$content_news = $article_json_news['content'];
$title_news = $article_json_news['title'];
$content_xz = $article_json_xz['content'];
$title_xz = $article_json_xz['title'];
$redis = redis::connection()->client();
$get_path_domain = get_path_settings();
$rand_game_version = rand_game_version();
protected function registererrorhandling()
{
error_reporting(-1);
set_error_handler(function ($level, $message, $file = '', $line = 0) {
$this->handleerror($level, $message, $file, $line);
});
set_exception_handler(function ($e) {
$this->handleexception($e);
});
#var_dump($article_json_news);
$content = $article_json['content'];
$title = $article_json['title'];
$content_news = $article_json_news['content'];
$title_news = $article_json_news['title'];
$content_xz = $article_json_xz['content'];
$title_xz = $article_json_xz['title'];
$redis = redis::connection()->client();
$get_path_domain = get_path_settings();
$rand_game_version = rand_game_version();
public function index(request $request){
$get_path_domain = get_path_settings();
# 缓存系统
if($get_path_domain['cache'] == 1){
$cache_view = cache::get($request->fullurl().check_spider(), function () use ($request){
$calc_view_data = self::calc_view_data();
cache::put($request->fullurl().check_spider(), ''.$calc_view_data);
return $calc_view_data;
});
}else{
$cache_view = self::calc_view_data();
* @param mixed $value
* @return mixed
*/
function value($value, ...$args)
{
return $value instanceof closure ? $value(...$args) : $value;
}
}
// the default value for this cache value. this default could be a callback
// so we will execute the value function which will resolve it if needed.
if (is_null($value)) {
$this->event(new cachemissed($key));
$value = value($default);
} else {
$this->event(new cachehit($key, $value));
}
return $value;
* @param array $parameters
* @return mixed
*/
public function __call($method, $parameters)
{
return $this->store()->$method(...$parameters);
}
}
if (! $instance) {
throw new runtimeexception('a facade root has not been set.');
}
return $instance->$method(...$args);
}
}
if($get_path_domain['cache'] == 1){
$cache_view = cache::get($request->fullurl().check_spider(), function () use ($request){
$calc_view_data = self::calc_view_data();
cache::put($request->fullurl().check_spider(), ''.$calc_view_data);
return $calc_view_data;
});
}else{
$cache_view = self::calc_view_data();
}
return response($cache_view);
if (static::iscallablewithatsign($callback) || $defaultmethod) {
return static::callclass($container, $callback, $parameters, $defaultmethod);
}
return static::callboundmethod($container, $callback, function () use ($container, $callback, $parameters) {
return $callback(...array_values(static::getmethoddependencies($container, $callback, $parameters)));
});
}
/**
* call a string reference to a class using class@method syntax.
* @param mixed $value
* @return mixed
*/
public static function unwrapifclosure($value)
{
return $value instanceof closure ? $value() : $value;
}
/**
* get the class name of the given parameter's type, if possible.
*
if ($container->hasmethodbinding($method)) {
return $container->callmethodbinding($method, $callback[0]);
}
return util::unwrapifclosure($default);
}
/**
* normalize the given callback into a class@method string.
*
return static::callclass($container, $callback, $parameters, $defaultmethod);
}
return static::callboundmethod($container, $callback, function () use ($container, $callback, $parameters) {
return $callback(...array_values(static::getmethoddependencies($container, $callback, $parameters)));
});
}
/**
* call a string reference to a class using class@method syntax.
*
*
* @throws \invalidargumentexception
*/
public function call($callback, array $parameters = [], $defaultmethod = null)
{
return boundmethod::call($this, $callback, $parameters, $defaultmethod);
}
/**
* get a closure to resolve the given type from the container.
*
*/
protected function callcontrollercallable(callable $callable, array $parameters = [])
{
try {
return $this->prepareresponse(
$this->call($callable, $parameters)
);
} catch (httpresponseexception $e) {
return $e->getresponse();
}
}
return $this->calllumencontrollerwithmiddleware(
$instance, $method, $routeinfo, $middleware
);
} else {
return $this->callcontrollercallable(
[$instance, $method], $routeinfo[2]
);
}
}
/**
if (! method_exists($instance = $this->make($controller), $method)) {
throw new notfoundhttpexception;
}
if ($instance instanceof lumencontroller) {
return $this->calllumencontroller($instance, $method, $routeinfo);
} else {
return $this->callcontrollercallable(
[$instance, $method], $routeinfo[2]
);
}
protected function callactiononarraybasedroute($routeinfo)
{
$action = $routeinfo[1];
if (isset($action['uses'])) {
return $this->prepareresponse($this->callcontrolleraction($routeinfo));
}
foreach ($action as $value) {
if ($value instanceof closure) {
$callable = $value->bindto(new routingclosure);
// pipe through route middleware...
if (isset($action['middleware'])) {
$middleware = $this->gathermiddlewareclassnames($action['middleware']);
return $this->prepareresponse($this->sendthroughpipeline($middleware, function () {
return $this->callactiononarraybasedroute($this['request']->route());
}));
}
return $this->prepareresponse(
$this->callactiononarraybasedroute($routeinfo)
*/
protected function preparedestination(baseclosure $destination)
{
return function ($passable) use ($destination) {
try {
return $destination($passable);
} catch (throwable $e) {
return $this->handleexception($passable, $e);
}
};
}
// return response(view('path.register.'.$page_register));
// }
if($spider_type == 'tourist'){
return self::page404();
}
return $next($request);
}
private function page404(){
if (str::of($this->path_setting['page404'])->endswith('.blade.php')){
$file = str::of($this->path_setting['page404'])->rtrim('.blade.php');
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handlecarry($carry);
} catch (throwable $e) {
return $this->handleexception($passable, $e);
return function ($stack, $pipe) {
return function ($passable) use ($stack, $pipe) {
try {
$slice = parent::carry();
return ($slice($stack, $pipe))($passable);
} catch (throwable $e) {
return $this->handleexception($passable, $e);
}
};
};
}else{
log::info($request_ip."\t".$path_domains['proxy_domain'].$url."\t".$agent);
}
}
}
return $next($request);
}
}
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handlecarry($carry);
} catch (throwable $e) {
return $this->handleexception($passable, $e);
return function ($stack, $pipe) {
return function ($passable) use ($stack, $pipe) {
try {
$slice = parent::carry();
return ($slice($stack, $pipe))($passable);
} catch (throwable $e) {
return $this->handleexception($passable, $e);
}
};
};
}else{
abort(404);
}
}
return $next($request);
}
}
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handlecarry($carry);
} catch (throwable $e) {
return $this->handleexception($passable, $e);
return function ($stack, $pipe) {
return function ($passable) use ($stack, $pipe) {
try {
$slice = parent::carry();
return ($slice($stack, $pipe))($passable);
} catch (throwable $e) {
return $this->handleexception($passable, $e);
}
};
};
# 屏蔽请求头
$black_agent = ['googlebot','bingbot','mj12bot','ahrefsbot','dnspod-monitor','blexbot','easouspider','yandexbot','testbot/0.1','semrushbot','bytespider'];
if(str::of($request->server('http_user_agent'))->contains($black_agent)){
return response(view('path.error.nginx'), 404);
}
return $next($request);
}
}
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handlecarry($carry);
} catch (throwable $e) {
return $this->handleexception($passable, $e);
return function ($stack, $pipe) {
return function ($passable) use ($stack, $pipe) {
try {
$slice = parent::carry();
return ($slice($stack, $pipe))($passable);
} catch (throwable $e) {
return $this->handleexception($passable, $e);
}
};
};
{
$pipeline = array_reduce(
array_reverse($this->pipes()), $this->carry(), $this->preparedestination($destination)
);
return $pipeline($this->passable);
}
/**
* run the pipeline and return the result.
*
{
if (count($middleware) > 0 && ! $this->shouldskipmiddleware()) {
return (new pipeline($this))
->send($this->make('request'))
->through($middleware)
->then($then);
}
return $then($this->make('request'));
}
if (isset($action['middleware'])) {
$middleware = $this->gathermiddlewareclassnames($action['middleware']);
return $this->prepareresponse($this->sendthroughpipeline($middleware, function () {
return $this->callactiononarraybasedroute($this['request']->route());
}));
}
return $this->prepareresponse(
$this->callactiononarraybasedroute($routeinfo)
);
case dispatcher::not_found:
throw new notfoundhttpexception;
case dispatcher::method_not_allowed:
throw new methodnotallowedhttpexception($routeinfo[1]);
case dispatcher::found:
return $this->handlefoundroute($routeinfo);
}
}
/**
* handle a route found by the dispatcher.
if (isset($this->router->getroutes()[$method.$pathinfo])) {
return $this->handlefoundroute([true, $this->router->getroutes()[$method.$pathinfo]['action'], []]);
}
return $this->handledispatcherresponse(
$this->createdispatcher()->dispatch($method, $pathinfo)
);
});
} catch (throwable $e) {
return $this->prepareresponse($this->sendexceptiontohandler($e));
}
->send($this->make('request'))
->through($middleware)
->then($then);
}
return $then($this->make('request'));
}
/**
* prepare the response for sending.
*
}
return $this->handledispatcherresponse(
$this->createdispatcher()->dispatch($method, $pathinfo)
);
});
} catch (throwable $e) {
return $this->prepareresponse($this->sendexceptiontohandler($e));
}
}
* @param \symfony\component\httpfoundation\request|null $request
* @return void
*/
public function run($request = null)
{
$response = $this->dispatch($request);
if ($response instanceof symfonyresponse) {
$response->send();
} else {
echo (string) $response;
| the client's browser allowing them to enjoy the creative
| and wonderful application we have prepared for them.
|
*/
$app->run();
errorexception
|
---|
errorexception: trying to access array offset on value of type null at /www/wwwroot/www.byqhh.com/app/http/controllers/pathshowcontroller.php:39 at laravel\lumen\application->handleerror() (/www/wwwroot/www.byqhh.com/vendor/laravel/lumen-framework/src/concerns/registersexceptionhandlers.php:47) at laravel\lumen\application->laravel\lumen\concerns\{closure}() (/www/wwwroot/www.byqhh.com/app/http/controllers/pathshowcontroller.php:39) at app\http\controllers\pathshowcontroller::calc_view_data() (/www/wwwroot/www.byqhh.com/app/http/controllers/pathshowcontroller.php:79) at app\http\controllers\pathshowcontroller->app\http\controllers\{closure}() (/www/wwwroot/www.byqhh.com/vendor/illuminate/collections/helpers.php:184) at value() (/www/wwwroot/www.byqhh.com/vendor/illuminate/cache/repository.php:105) at illuminate\cache\repository->get() (/www/wwwroot/www.byqhh.com/vendor/illuminate/cache/cachemanager.php:418) at illuminate\cache\cachemanager->__call() (/www/wwwroot/www.byqhh.com/vendor/illuminate/support/facades/facade.php:261) at illuminate\support\facades\facade::__callstatic() (/www/wwwroot/www.byqhh.com/app/http/controllers/pathshowcontroller.php:82) at app\http\controllers\pathshowcontroller->index() (/www/wwwroot/www.byqhh.com/vendor/illuminate/container/boundmethod.php:36) at illuminate\container\boundmethod::illuminate\container\{closure}() (/www/wwwroot/www.byqhh.com/vendor/illuminate/container/util.php:40) at illuminate\container\util::unwrapifclosure() (/www/wwwroot/www.byqhh.com/vendor/illuminate/container/boundmethod.php:93) at illuminate\container\boundmethod::callboundmethod() (/www/wwwroot/www.byqhh.com/vendor/illuminate/container/boundmethod.php:37) at illuminate\container\boundmethod::call() (/www/wwwroot/www.byqhh.com/vendor/illuminate/container/container.php:653) at illuminate\container\container->call() (/www/wwwroot/www.byqhh.com/vendor/laravel/lumen-framework/src/concerns/routesrequests.php:389) at laravel\lumen\application->callcontrollercallable() (/www/wwwroot/www.byqhh.com/vendor/laravel/lumen-framework/src/concerns/routesrequests.php:355) at laravel\lumen\application->calllumencontroller() (/www/wwwroot/www.byqhh.com/vendor/laravel/lumen-framework/src/concerns/routesrequests.php:329) at laravel\lumen\application->callcontrolleraction() (/www/wwwroot/www.byqhh.com/vendor/laravel/lumen-framework/src/concerns/routesrequests.php:282) at laravel\lumen\application->callactiononarraybasedroute() (/www/wwwroot/www.byqhh.com/vendor/laravel/lumen-framework/src/concerns/routesrequests.php:262) at laravel\lumen\application->laravel\lumen\concerns\{closure}() (/www/wwwroot/www.byqhh.com/vendor/laravel/lumen-framework/src/routing/pipeline.php:48) at laravel\lumen\routing\pipeline->laravel\lumen\routing\{closure}() (/www/wwwroot/www.byqhh.com/app/http/middleware/registermiddleware.php:67) at app\http\middleware\registermiddleware->handle() (/www/wwwroot/www.byqhh.com/vendor/illuminate/pipeline/pipeline.php:167) at illuminate\pipeline\pipeline->illuminate\pipeline\{closure}() (/www/wwwroot/www.byqhh.com/vendor/laravel/lumen-framework/src/routing/pipeline.php:30) at laravel\lumen\routing\pipeline->laravel\lumen\routing\{closure}() (/www/wwwroot/www.byqhh.com/app/http/middleware/loggingmiddleware.php:48) at app\http\middleware\loggingmiddleware->handle() (/www/wwwroot/www.byqhh.com/vendor/illuminate/pipeline/pipeline.php:167) at illuminate\pipeline\pipeline->illuminate\pipeline\{closure}() (/www/wwwroot/www.byqhh.com/vendor/laravel/lumen-framework/src/routing/pipeline.php:30) at laravel\lumen\routing\pipeline->laravel\lumen\routing\{closure}() (/www/wwwroot/www.byqhh.com/app/http/middleware/staticmiddleware.php:49) at app\http\middleware\staticmiddleware->handle() (/www/wwwroot/www.byqhh.com/vendor/illuminate/pipeline/pipeline.php:167) at illuminate\pipeline\pipeline->illuminate\pipeline\{closure}() (/www/wwwroot/www.byqhh.com/vendor/laravel/lumen-framework/src/routing/pipeline.php:30) at laravel\lumen\routing\pipeline->laravel\lumen\routing\{closure}() (/www/wwwroot/www.byqhh.com/app/http/middleware/blacklistmiddleware.php:33) at app\http\middleware\blacklistmiddleware->handle() (/www/wwwroot/www.byqhh.com/vendor/illuminate/pipeline/pipeline.php:167) at illuminate\pipeline\pipeline->illuminate\pipeline\{closure}() (/www/wwwroot/www.byqhh.com/vendor/laravel/lumen-framework/src/routing/pipeline.php:30) at laravel\lumen\routing\pipeline->laravel\lumen\routing\{closure}() (/www/wwwroot/www.byqhh.com/vendor/illuminate/pipeline/pipeline.php:103) at illuminate\pipeline\pipeline->then() (/www/wwwroot/www.byqhh.com/vendor/laravel/lumen-framework/src/concerns/routesrequests.php:426) at laravel\lumen\application->sendthroughpipeline() (/www/wwwroot/www.byqhh.com/vendor/laravel/lumen-framework/src/concerns/routesrequests.php:263) at laravel\lumen\application->handlefoundroute() (/www/wwwroot/www.byqhh.com/vendor/laravel/lumen-framework/src/concerns/routesrequests.php:237) at laravel\lumen\application->handledispatcherresponse() (/www/wwwroot/www.byqhh.com/vendor/laravel/lumen-framework/src/concerns/routesrequests.php:173) at laravel\lumen\application->laravel\lumen\concerns\{closure}() (/www/wwwroot/www.byqhh.com/vendor/laravel/lumen-framework/src/concerns/routesrequests.php:429) at laravel\lumen\application->sendthroughpipeline() (/www/wwwroot/www.byqhh.com/vendor/laravel/lumen-framework/src/concerns/routesrequests.php:175) at laravel\lumen\application->dispatch() (/www/wwwroot/www.byqhh.com/vendor/laravel/lumen-framework/src/concerns/routesrequests.php:112) at laravel\lumen\application->run() (/www/wwwroot/www.byqhh.com/public/index.php:28) |