By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,109 Members | 969 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,109 IT Pros & Developers. It's quick & easy.

menus in php

P: n/a
hi frns,
currently i have web application in php which has its menus created in
javascript.
if we do view source on the page, it displays all the javascript which
is obvious n natural.
but it displays all the file names of php too which are related with
those specific menus.
dont we have any way by which we can prevent it.
as an alternate i m thinking of creating the menus also in php so that
the names of my files dont get visible to the user from the security
point of view.
is it sensible to do so because it will be an extra overhead to the
system for creating the manus everytime.
plz reply
thanx in advance

Jun 21 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a

Josh wrote:
but it displays all the file names of php too which are related with
those specific menus.


Showing PHP filenames is not a security risk. What is your problem?

Jun 21 '06 #2

P: n/a
If you want to hide your file names then don't use them in your menus,
instead have the menus seind some data to aredirector script, which
translates the data into a header to the proper script.
I.e. In your menu:
<a href="mymenu.php?menu=maillist">Mailing List</a>

Then in the mymenu.php file

(after you clean $_GET['menu'] and return to $menu...)
switch( $menu ){
case "maillist":
header("Location: users/maillist.php");
exit();
break;
case... etc.

default:
//bad entry return back to menu display script
}

You could proabbly do it with an array in an include to make the menu
easier to work with.

Jun 22 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.