Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/opengl/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Cakephp 3.0 router.php不工作_Php_Routes_Cakephp 3.2 - Fatal编程技术网

Cakephp 3.0 router.php不工作

Cakephp 3.0 router.php不工作,php,routes,cakephp-3.2,Php,Routes,Cakephp 3.2,我在router.php文件中获得了以下代码: <?php use Cake\Routing\Router; Router::scope('/', function ($routes) { $routes->redirect('/e/*', 'http://google.com', ['status' => 302]); }); ?> 但是,当我转到它时,它给出了以下信息: 有什么建议吗 编辑:我正在使用PHP7.0。在PHP5.6.10上测试,工作完美。

我在router.php文件中获得了以下代码:

<?php

use Cake\Routing\Router;

 Router::scope('/', function ($routes) {
$routes->redirect('/e/*', 'http://google.com', ['status' => 302]);
});

?>

但是,当我转到它时,它给出了以下信息:

有什么建议吗


编辑:我正在使用PHP7.0。在PHP5.6.10上测试,工作完美。

是cake版本中的一个错误。更新和工作良好