0

Hello,

I am trying to understand the CI code that somebody made. I saw there are two folders: site & admin folders in CI application folder.

I wonder why? Is it to separate the site and admin page? Is that possible?

5
Contributors
6
Replies
39
Views
3 Years
Discussion Span
Last Post by GliderPilot
0

I am trying to understand the CI code that somebody made. I saw there are two folders: site & admin folders in CI application folder.

If someone created those 2 folders, then you should ask that person who create it.

I'm not being rude but you been posting these ridiculous questions about CI when you can look at their guides & forum.

There are tutorial on CI but you seen want to get a quick answer/code on Daniweb and not bother learning and understanding how the CI platform function.

Edited by LastMitch

0

Well, I have been reading the CI guides. The CI tutorials from google also a good idea.

I have asked the person regarding the the two files in the application, he mentioned that yes that's to seperate the backend and the frontend. I am trying to create a similar thing. It's not a good idea though if I keep asking too much about the programming side of CI.

So I thought I am looking for another source to answer the question maybe someone else can help me.

I receive this errors when I run the CI program after seperating the site and admin in application folders:

Warning: require(application/config/constants.php): failed to open stream: No such file or directory in C:\xampp\htdocs\IndonusaCI\system\core\CodeIgniter.php on line 64

Fatal error: require(): Failed opening required 'application/config/constants.php' (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\IndonusaCI\system\core\CodeIgniter.php on line 64

Anyone know how to fix this problem?

Thanks before.

0

I dont really dabble to much in CI, however what you have is a broken require link. Basically in CodeIgniter.php on line 64 you should have a

require ('applications/config/constants.php'); 

line of code. You need to double check your file path because for whatever odd reason the script is not able to find that file in that directory. If you have been moving around files like you mentioned above it may just be that the file is not sitting in the proper directory. I would open up google and look up how to properly require/include files in your scripts, using variables, absolute and relative paths.

0

This is on line 64:

    else
    {
        require(APPPATH.'site/config/constants.php'); 
        require(APPPATH.'config/constants.php');
    }

I thought it already in the correct address, yet it still showing me the same error.

line 64 (require(APPPATH.'site/config/constants.php');) appears to works:

why now line 65 (require(APPPATH.'config/constants.php');) showing similar error?

Warning: require(application/config/constants.php): failed to open stream: No such file or directory in C:\xampp\htdocs\IndonusaCI2\system\core\CodeIgniter.php on line 65

Fatal error: require(): Failed opening required 'application/config/constants.php' (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\IndonusaCI2\system\core\CodeIgniter.php on line 65

Edited by davy_yg

0

It is custom made file system, not CI native.
You need to be sure if site folder is still there (in application).
Also, if in application folder, as you say, there are just two folders site and admin, second require is not acceptable. Simply, there is no config file directly under APPPATH. Try with:

require(APPPATH.'admin/config/constants.php');
0

If you're going to change the folder names for the application and system folders you need to go into the main CI index.php file and change those values to your new file names.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.