Jump to content

What is in your index.php?


eazyGen

Recommended Posts

An open question this, and one that may or may not bear fruit. But here we go anyway.

 

index.php is a special case I feel because it is often the default script that is called for a web site. Moreover, I keep mine in the freely available root directory, but the rest of my php is out of the root for security purposes - in a directory called "lib".

 

The app I am working on at the present time requires that a user logs on first. So, the code I have in my index.php is very simple:

 

<?php

/* Require Log In */

require("lib/ezLogin.php");

?>

 

This at least is what I have presently. So I have a few questions:

 

1. Is treating index.php as a special case, a reasonable approach would you say?

2. Is the separation of the rest of the non-client php files a real security improvement?

3. When you declare the css path, do you use absolute path names? If so, how might it be done so it will work on local (testing) AND the main server (production) with no code change?

4. includes_path - I assume this is the path to the includes directory. However, I am not sure/happy/comfortable with this just yet. Can more than one path be included in this? (I have Googled around but still unhappy) If so, how so? Does this approach works across platforms? If not, is there a way to make it?

 

Many thanks for any help.

 

S

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.