Forums / General Questions / questions about firebug and PHP file.

questions about firebug and PHP file.

Views: 646

Results 1 to 4 of 4
22 Mar 2013, 8:14 AM
#1
fanisme avatar

fanisme

Zen Follower

Join Date:
Feb 2013
Posts:
104
Plugin Contributions:
0

questions about firebug and PHP file.

I have some questions about firebug. What's the relationshop between the PHP text and the HTML text which is showed by firebug? Are they same? And how can I know which PHP file or CSS file the web element belong to through firebug?

When I use firebug to change the elementary on the web and I can see the prompt effect, but I also don't know how to realize it through PHP or CSS. Somebody helps please

22 Mar 2013, 9:13 AM
#2
picandnix avatar

picandnix

Totally Zenned

Join Date:
Dec 2010
Location:
UK
Posts:
1,780
Plugin Contributions:
2

Re: questions about firebug and PHP file.

when you click on the element in left/main window have a look in the right pane, it'll tell you the css line and file.

22 Mar 2013, 9:41 AM
#3
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,876
Plugin Contributions:
7

Re: questions about firebug and PHP file.

And how can I know which PHP file or CSS file the web element belong to through firebug?
CSS: the right hand Firebug pane will show you the location of the css declaration(s) that are being applied to the selected element.

PHP: no so direct. The php files "build" the html files so a single html page may be made from many chunks of php.
This gets easier with experience but one way is to use the id of the element you are interested in, or one nearby, or a comment in the code, and search for that in the includes/files...

Or use the text in the page as a search term: find the constant in the language files where it is defined, then find the file where the constant is used.

This is much easier when you work on a local pc-based copy of your shop.

If you find multiple places/files where the search term is used, put a comment in the file and see if it appears in the html page.

There's lots of trial and error until you get some intuition about how things work.

But of course this all something to do later..after you have completed the urgent upgrade away from the unsecure 1.38 which of course you are busy with at the moment....

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

22 Mar 2013, 9:47 AM
#4
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: questions about firebug and PHP file.

You will not see any "php" once the page has been assembled. php is the code system used to build the html, which is then delivered to the browser. The php remains in the background and is not rendered at the browser.

20 years a Zencart User