Cannot use string offset as an array

浏览:65 发布日期:2019/01/20 分类:求助交流


<?php
namespace app\admin\service;
// use think\Url;
class getUrl
{
public static function addUrl($url)
{
// dump($url); die;
foreach ($url as $key => $value) {
if(empty($value['parameter'])) {
$url = url($value['module'].'/'.$value['controller'].'/'.$value['function']);
} else {
$url = url($value['module'].'/'.$value['controller'].'/'.$value['function'],$value['parameter']);
}
// dump($url); die;
$url[$key]['url'] = $url;
}
return $url;
}

}
?>
最佳答案
评论( 相关
后面还有条评论,点击查看>>