Skip to content

Blog Công Nghệ

MENUMENU
  • Trang chủ
  • Giới Thiệu
  • Lập Trình
    • Lập Trình Website
      • Laravel
        • Phân Tích Dự Án
      • PHP
      • SQL
      • HTML
      • CSS
      • Javascipt
      • My Project
      • Wordpress
    • Luyện Skill
    • Lập trình winform
    • CSDL
    • Lập Trình Android
    • Trí tuệ nhân tạo
    • Khai Khoáng Dữ Liệu
    • Arduino
    • Khác
    • Đồ án
  • Phần Mềm
    • Powerpoint
    • Tool
  • Cuộc sống và Giải trí
    • Hợp âm
    • web5ngay - youtube
    • Công Giáo
    • Kỹ Năng Sống
    • Street Workout
  • Danh sách bài viết
  • Guide line
    • Guild line phỏng vấn
    • Guide lines Laravel
    • Guide line Module Frontend
  • Tóm tắt sách
  • Fanpage

Blog Công Nghệ

Nơi chia sẻ kiến thức

Kinh nghiệm Codeigniter – Perfex CRM

13 Tháng Tư, 2022 by admin
Lượt xem: 6

1. Config một project mới

Vào application/config/config.php  => chỉnh APP_BASE_URL,  chỉnh thông tin database

Tạo file .htaccess  ở ngoài thư mục gốc cùng cấp file index.php

<IfModule mod_rewrite.c>
RewriteEngine On

#Checks to see if the user is attempting to access a valid file,
#such as an image or css document, if this isn't true it sends the
#request to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
#This last condition enables access to the images and css folders, and the robots.txt file
RewriteCond $1 !^(index\.php|public|images|robots\.txt|css)
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>

2. Router

url/[ControllerName]/[method]/[param1]/[param2]…

có thể config route lại trong file application/config/route.php

$route['clients/login']           = 'authentication/login'; // bên phải là tên Controller/tên method

3. Middleware

Chặn ngay constructor của class.

Đá login do ValidatesContact thực hiện

<?php

defined('BASEPATH') or exit('No direct script access allowed');

use app\services\ValidatesContact;

class Clients extends ClientsController
{
    /**
     * @since  2.3.3
     */
    use ValidatesContact;

    public function __construct()
    {
        parent::__construct();

        hooks()->do_action('after_clients_area_init', $this);
    }

Related posts:

  1. Kinh nghiệm VueJS
  2. Kinh nghiệm Linux
  3. Kinh nghiệm laravel
  4. Kinh nghiệm css, javascript – frontend

Post navigation

Previous Post:

Kinh nghiệm Linux

Next Post:

Kinh nghiệm ThreeJS – WebAR

Trả lời Hủy

Email của bạn sẽ không được hiển thị công khai. Các trường bắt buộc được đánh dấu *

Ẩn sidebar

Tìm kiếm

Generic selectors
Exact matches only
Search in title
Search in content
Search in posts
Search in pages

Blog Công Nghệ

Bài viết mới

  • Master typescript
  • Sendmail trong Laravel sử dụng dịch vụ SES, SQS của Amazon
  • Install SSL in Nginx Ubuntu
  • Docker study
  • Bảo vệ: Hướng dẫn code bot Telegram easy game

Lượng truy cập

0074494
Visit Today : 90
Visit Yesterday : 178
This Month : 765
Who's Online : 7
© 2025 Blog Công Nghệ | WordPress Theme by Superbthemes