如何在Codeigniter 4中为geojson创建函数,这是我在Codeigniter 3中创建的函数的示例,但不能在Codeigniter 4中创建,所以呢?

问题描述 投票:0回答:1
public function geoJSON()
{
    $records = $this->example_model->getAll();
    $this->load->view('geojson', ['records'=>$records]);        
}

这是代码生成器3中的示例功能

codeigniter geojson codeigniter-4
1个回答
0
投票

因为Codeigniter 4使用PHP 7.0 ++,而上述语法直到PHP 5.4才受支持我认为您需要这样的内容

© www.soinside.com 2019 - 2024. All rights reserved.