menus in php

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Josh

    #1

    menus in php

    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

  • Sjoerd

    #2
    Re: menus in php


    Josh wrote:[color=blue]
    > but it displays all the file names of php too which are related with
    > those specific menus.[/color]

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

    Comment

    • larry@portcommodore.com

      #3
      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.ph p?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("Locatio n: 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.

      Comment

      Working...