Jump to content

Recommended Posts

generally the only time your document paths are visible to the public space is when errors are reported. For example, mistype the name of that config.php file and watch the error.

 

As long as you have the errors under control and have a graceful way for your script to die or return an error written by you, then you should be alright.

 

The other measure is to turn error reporting off altogether for a site. You can do this in the PHP.ini file or you can do this.

error_reporting(E_WARNING);
ini_set('display_errors', '0');

 

But you must remember that once a person can see the page on screen PHP is done doing what it is going to do. PHP is server side, so it is pretty secure in that your php code cannot be seen without File level access or by chance the PHP installation gets messed up and it is not parsing the php code. then your code will be outputted as HTML.

 

If I am wrong about these things, then please someone let me know.

 

lets just say no... if you want to include a file, you must have the filepath typed out somewhere... wether you hide a define somewhere and just use its key... or make it a variable somewhere, you still need to have it in there... now... php is server side... so nomater what way you do it... the only way to find that filepath, is to have file level access(ftp/filemanager) and view the file directly...

Why do you want to hide the path at include ?

 

I don't want to show the file directory in my url like if i have two folder like admin and user . when user login a/c to their privilages they will directed to admin or user folder so inthe url admin or user folder shown that i don't want to show it so how to avoid it..

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.