Posts

Showing posts from October, 2024

model

  <?php defined ( 'BASEPATH' ) or exit ( 'No direct script access allowed' ); class my_model extends CI_Model {     public function insert_post ( $data )     {         $this -> db -> insert ( 'post' , $data );         if ( $this -> db -> affected_rows () > 0 ) {             return $this -> db -> insert_id ();         } else {             return false ;         }     }     public function get_category ()     {         $query = $this -> db -> get ( 'characters' );         return $query -> result ();     }     public function get_tag1 ()     {         $query = $this -> db -> get ( 'tags' );         return $query -> result ();  ...

htacess

  RewriteOptions inherit < IfModule mod_rewrite.c >     RewriteEngine On     RewriteBase /     # Redirect Trailing Slashes If Not A Folder...     RewriteCond %{REQUEST_FILENAME} !- d     RewriteRule ^ (. * ) / $ / $1 [ L , R = 301 ]     # Remove index.php from URL if present     RewriteCond %{THE_REQUEST} ^ [ A - Z ]{ 3 ,}\s /+ index\.php / [ ^ \s] * [ NC ]     RewriteRule ^ index\.php / (. * )$ / $1 [ R = 301 , L ]     # Redirect to HTTPS if not already (Optional: uncomment if needed)     # RewriteCond %{HTTPS} !=on     # RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]     # Handle front-controller for non-existing files and directories     RewriteCond %{REQUEST_FILENAME} !- f     RewriteCond %{REQUEST_FILENAME} !- d     RewriteRule ^ (. * )$ index.php / $1 [ L ] </ IfModule > < IfModule ...