4

When I inspect an element of my webpage using Firebug, I cannot identify which .php code it using and on which php file I can find this code on from the server. Is there any other way to locate pieces of php codes from a browser?

Many thanks,

Arthur

Arthur Mamou-Mani
  • 2,303
  • 10
  • 43
  • 69

3 Answers3

1

You could edit the source code to make print out. Maybe a HTML comment such as:<!-- Start of index.php -->

I actively work to hide what PHP-file is used to generate any specific HTML-output as it makes out a serious security threat.

Gustav
  • 2,902
  • 1
  • 25
  • 31
0

Look at the address bar of the browser. Firebug inspect works for the current browser page and it doesn't know what PHP is - it's just HTML content, regardless of the script running on the server that generated the content.

If this doesn't help, elaborate your question.

ddinchev
  • 33,683
  • 28
  • 88
  • 133
  • 1
    Thanks Veseliq, how can I identify the specific .PHP file to modify on my server? – Arthur Mamou-Mani Aug 24 '11 at 22:35
  • 3
    This is impossible to know without more details. I would go by doing simple text search on the files on your server for snippets of HTML that is unlikely to be dynamic like '
    ' to look up where the HTML near that div is generated. BUT this is totally shooting directions - no way to know what your server system is, how it generates content and firebug can not help you at all.
    – ddinchev Aug 24 '11 at 22:40
  • 2
    Look at the address bar, that will tell you which file the page you are looking at was loaded from... What exactly are you trying to modify? I think you're asking wrong question to be honest - it's not 'how do I find it in Firebug', but 'how do I find the bit of PHP code that does XXX' – DaveRandom Aug 24 '11 at 22:42
0

If this were possible it would make php less secure, a part of the security is the obscurity, if you could simple find out which file does what it would be much easer to launch a targeted attack.

gnur
  • 4,671
  • 2
  • 20
  • 33