Welcome Guest, Not a member yet? Register   Sign In
index.php in the root folder?
#1

Hi Everyone,

Documentation says :
"setting up = none"
and
"[b]pros = download and run"
[/b]

Well... I downloaded it. put it in the root folder of an xampp server with php7.4 on Windows. It didn't run.  Dodgy
I tried to setup nothing. It didn't run either.  Dodgy

I believe the documentation needs improvements.  Sleepy


However, it is not the point of this topic.

I am a CI 3 developer and I usually have small scale and straight forward projects. I like to use CI 3 because it makes my development process easier. Since it handles a lot of things that I wouldn't want to( probably also can't ) code...

I also like to be up to date and I decided to take a look at CI 4. And at the first minutes, I didn't like it. Because it says "you have to setup virtual host"... Please don't get me wrong. I am not complaining. Also I can do virtual host thing. But I am more likely an off the shelf person and don't like to do a lot of configuration on the server side. I feel like if I need to move on a new server, I wouldn't worry about if the hosting provider allows me to temper with the virtual hosts or something other stuff.

So, I simply put an index.php file on the root folder ( which is localhost/ci4/ ).

Then added only this line in it : <?php require_once('public/index.php'); ?>  Big Grin Cool

So far, it works fine. I am able to see the pages without doing any virtual host or any server configuration. I couldn't do much things on CI4 but simple things works fine. 

So, I know that there is a reason to move the index.php into the public folder. I am not quite 100% sure why, but I am sure you guys have good reasons and my index.php on the root attempt probably ignores some of this reasons. But I couldn't find another solution.


My question is ( finally ) How worse is it?  Angel

If this would lead problems ( bugs or security ), Is there any solution without tampering with server configuration. May be using .htaccess files?
Reply


Messages In This Thread
index.php in the root folder? - by kadirilkimen - 01-12-2021, 07:30 PM
RE: index.php in the root folder? - by iRedds - 01-12-2021, 08:22 PM
RE: index.php in the root folder? - by iRedds - 01-12-2021, 10:12 PM
RE: index.php in the root folder? - by iRedds - 01-13-2021, 06:37 AM



Theme © iAndrew 2016 - Forum software by © MyBB