PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, October 26, 2022

[FIXED] How to use codeigniter routes on a procedural style PHP website with a codeigniter folder structure?

 October 26, 2022     codeigniter, oop, php, procedural, routes     No comments   

Issue

I have a website built with a folder structure exactly like code igniter which has this folders:

  • app (controllers/core/helpers/libraries/models/views/) etc.
  • assets
  • files
  • system (core/database/fonts/helpers/language/libraries)
  • themes (default)
  • vendor

Codeigniter uses routes via Router.php to map urls so the url looks clean, this means instead of using:

www.example.com/app/controllers/index.php

you just use

www.example.com/

and so on for the other folders, but codeigniter it's object oriented, and this website is made in procedural style.

Is there a way I can reply that routes for my website?

Thanks


Solution

There are plenty of PHP routers plugins that you could use, among populars AltoRouter, FastRoute, Klein.php.



Answered By - b126
Answer Checked By - Cary Denson (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing