Home>

Hello.

I am going to modify a web page written by another person.

Since the contents were very common, if you thought that only static + inquiry page had a structure of PHP, open it, surprised, create a template structure with header and footer written in PHP like WordPress It was done.

I want to rewrite the code in the header and footer, but I'm having a hard time finding where the variables and IDs are cited from somewhere in the php file for some reason.

For example

<? php echo $tpl ["header_page"];?>


If so, we are doing an inefficient thing to search in the file that seems to be the string header_page.

Is there a way to find out where i am bringing from more efficiently?

I'm sorry for this very rudimentary question, thank you.

  • Answer # 1

      

    Search in a file that looks like the string header_page

    Is that all right?
    If your editor has a grep function, please use that.

  • Answer # 2

    How about debugging with VS code?
    You can also debug php.

  • Answer # 3

    Generally, you can solve the problem by assigning a descriptive name to the variable (you can remember it later), but I think it's the easiest to do the search.