controllers/News.php |
(04-29-2019, 08:52 AM)Wouter60 Wrote: The error message you got, is caused by a missing semi-colon at the end of line 8. Hi Wouter60. I am still getting the following errors. An uncaught Exception was encountered Type: ParseError Message: syntax error, unexpected 'public' (T_PUBLIC) Filename: C:\wamp64\www\aircomp.co.za\application\controllers\News.php Line Number: 18 Backtrace: File: C:\wamp64\www\aircomp.co.za\index.php Line: 315 Function: require_once And here is my code from the controllers/News.php <?php defined('BASEPATH') OR exit('No direct script access allowed'); class News extends CI_Controller { public function __construct() { parent::__construct(); $this->load->model('News_model'); $this->load->helper('url_helper'); } public function index() { $data['news'] = $this->news_model->get_news(); public function view($slug = NULL) { $data['news_item'] = $this->news_model->get_news($slug); if (empty($data['news_item'])) { show_404(): } $data['title] = $data['news_item']['title']; $this->load->view('templates/header', $data); $this->load->view('news/view', $data); $this->load->view('templates/footer'); } } |
Messages In This Thread |
controllers/News.php - by shewolf255 - 04-29-2019, 12:01 AM
RE: controllers/News.php - by ciadmin - 04-29-2019, 01:39 AM
RE: controllers/News.php - by shewolf255 - 04-29-2019, 06:21 AM
RE: controllers/News.php - by ciadmin - 04-29-2019, 06:26 AM
RE: controllers/News.php - by shewolf255 - 04-29-2019, 07:01 AM
RE: controllers/News.php - by albertleao - 04-29-2019, 07:13 AM
RE: controllers/News.php - by shewolf255 - 04-29-2019, 07:57 AM
RE: controllers/News.php - by shewolf255 - 04-29-2019, 07:48 AM
RE: controllers/News.php - by Wouter60 - 04-29-2019, 07:59 AM
RE: controllers/News.php - by ciadmin - 04-29-2019, 08:08 AM
RE: controllers/News.php - by shewolf255 - 04-29-2019, 10:45 AM
RE: controllers/News.php - by shewolf255 - 04-29-2019, 10:48 AM
RE: controllers/News.php - by Wouter60 - 04-29-2019, 08:52 AM
RE: controllers/News.php - by shewolf255 - 04-29-2019, 11:02 AM
RE: controllers/News.php - by ciadmin - 04-29-2019, 11:06 AM
RE: controllers/News.php - by shewolf255 - 04-29-2019, 02:02 PM
RE: controllers/News.php - by InsiteFX - 04-29-2019, 04:11 PM
|