menus in php

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
hi frns,
currently i have web application in php which has its menus created in
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

Re: menus in php

Josh wrote:
Quoted text here. Click to load it

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

Re: menus in php

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");
  case... etc.

//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.

Site Timeline