• Bỏ qua primary navigation
  • Skip to main content
  • Bỏ qua primary sidebar

Thủ thuật thiết kế website

Chia sẻ kinh nghiệm thiết kế website

  • Trang chủ
  • Joomla
    • Thủ thuật Joomla
    • Joomla Extensions
    • Joomla Themes
  • WordPress
    • Thủ thuật WordPress
    • WordPress Plugins
    • WordPress Themes
  • Web Development
    • HTML/CSS
    • Javascript
    • PHP
  • PHP Framework
    • Codeigniter
    • Laravel
    • Laminas
  • App Developer
    • React Native
    • Flutter
  • SEO
  • Chia sẻ
  • Phần mềm
Bạn đang ở:Trang chủ / PHP Framework / Codeigniter / [CodeIgniter 4] How to upload Codeigniter 4 website on share hosting?

[CodeIgniter 4] How to upload Codeigniter 4 website on share hosting?

13/05/2021 - Administrator Để lại bình luận

For security reason codeigniter4 folder is made suchg a way that all the libraried and code folder is outside the public folder. By url only public folder is accesible. To host it on share hosting your directory structure should look like this.

--home/root (sharehosting root directory)
   |__ public_html (or your domain root folder)
   |    |__assets
   |    |__ index.php
   |    |__ .htaccess
   |
   |__ codeigniter (create a folder with any name you like)
        |__ app(all the files and folder in app folder)
        |__ system
        |__ writable
        |__ .env (dot env file here)

Now you need to change some values to up and running your codeigniter4 project

In public_html folder index.php file chnage the

$pathsPath = FCPATH . '../app/Config/Paths.php';

to

$pathsPath = FCPATH . '../codeigniter/app/Config/Paths.php';

In app/Config folder App.php file change

$baseURL = 'http://192.168.0.111/';

to

$baseURL = 'http://yourdomain.com/';

After this chnage your site will be up and running. To deploy in subdomain and if your subdomain root folder lies in public_html then you should change

$pathsPath = FCPATH . '../app/Config/Paths.php';

to

$pathsPath = FCPATH.'../../codeigniter/app/Config/Paths.php';

in public_html/yourdomain folder index.php file, followed that directory structure remains same. Important: public folder content should be placed in your subdomain folder.

Nguồn : https://stackoverflow.com

0 0 đánh giá
Article Rating
Theo dõi
Đăng nhập
Thông báo của
guest
guest
0 Comments
Phản hồi nội tuyến
Xem tất cả bình luận

Sidebar chính

LỜI NGỎ

Đây là blog cá nhân, cung cấp các thông tin, kiến thức và kinh nghiệm về lập trình và cuộc sống. Những bài viết được mình sưu tập từ nhiều nguồn, mọi chi tiết liên quan đến bản quyền xin vui lòng liên hệ qua email kairu2607@gmail.com ! Cám ơn rất nhiều.

Tìm kiếm

Thủ thuật Wordpress

Vì Sao Rank Math Vượt Trội – SEO WordPress 2023

Thêm lượt xem bài viết vào WordPress Post Views Counter

Website Bị Hack Virus Index Tiếng Nhật và Toàn Tập Các Cách Xử Lý

Hướng dẫn tạo liên hệ All in one phiên bản có yêu cầu gọi lại

Tạo gợn sóng phân cách bằng SVG trên Flatsome

Tự động đăng nhập WordPress

Hướng Dẫn Upload Plugin Lên WordPress.org

Codeigniter Framework

[CodeIgniter 4] Codeigniter 4 Remove Public and Index.php From URL

[CodeIgniter 4] How to upload Codeigniter 4 website on share hosting?

Sửa lỗi website Codeigniter 2.x không chạy được với PHP 7.x

[CodeIgniter 4] Sử dụng cURL trong CodeIgniter 4

[CodeIgniter 4] Sử dụng cache để tăng tốc website trong CodeIgniter 4

[CodeIgniter 4] Xử lý hình ảnh chuyên nghiệp trong CodeIgniter 4

[CodeIgniter 4] Hướng dẫn gửi mail trong CodeIgniter 4

Dịch vụ Thiết Kế Website

Laravel

Laravel Cũng Có Notifications?

Cách Bảo Mật Đơn Giản Trong Laravel Bằng Ẩn Config Quan Trọng

Tạo Desktop Notification đơn giản và dể hiểu

Vime thư viện HTML5 Player vừa đẹp mà vừa ngon

Laravel domPDF cách tùy biến Font chữ bất chấp mọi thể loại

Laravel JetStream

Phần mềm hay

Hướng dẫn tắt Gatekeeper (Bật tùy chọn Anywhere) sửa lỗi “damaged and can’t be opened. You should move it to the Trash”

Cài lại macOS trên Mac Silicon (M1) “sạch trơn” bằng macOS Recovery

Cách vào Recovery [Startup Options] trên Mac dùng chip Apple Silicon [M1]

Hướng dẫn tắt System Integrity Protection (SIP) để chạy App Cr4ck

Remote System Explorer (SSH, Telnet, FTP and DStore protocols)

Copyright © 2023 · Metro Pro on Genesis Framework · WordPress · Đăng nhập

wpDiscuz