skip to Main Content

Code igniter 3.1.11 router.php not working – CPanel

Hi guys please advice me as Code igniter 3.1.11 router.php is not working Its only working for http://maindomain/ but not working for http://maindomain/about instead shows 404 page <?php defined('BASEPATH') OR exit('No direct script access allowed'); $route['(:any)'] = 'pages/view/$1'; $route['default_controller'] =…

VIEW QUESTION

Can't send server emails in CodeIgniter 4 – CPanel

I just hanged up to send server emails. I'm preparing email sending code like this: $email_config = Array( 'charset' => 'utf-8', 'mailType' => 'html' ); $email = ConfigServices::email(); $email->initialize($email_config); $email->setNewline("rn"); $email->setCRLF("rn"); $email->setFrom("[email protected]", "Sender name"); $email->setTo("[email protected]"); $email->setSubject("Test message"); $email->setMessage("Hello"); if ($email->send())…

VIEW QUESTION

ajax request in codeigniter returning html code instead of redirecting – Jquery ajax

I've added a constructor in a class to check if some user is logged in. public function __construct() { parent::__construct(); $this->load->library('form_validation'); $this->load->library('encryption'); if (!$this->session->userdata('id') || $this->session->userdata('role') != 'CUSTOMER') { redirect('account/login'); } } Here's the ajax $.ajax({ type:'POST', url:'<?php echo base_url("cart/addToCart");…

VIEW QUESTION
Back To Top
Search