Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 148
  • Last Modified:

Where does a static HTML and PHP file start to be interpreted?

Hi there;

It's very noob to ask this but i can't help asking this...

I write simple appcliations with C and Java...The code is compiled and intepreted from its main at start...

So, for a webpage either HTML or PHP or any tech. where does the code start to be interpreted? I mean i know the answer you will say from the very top...But are there any exceptions you can tell me?

I am using Apache by the way...

Thanks in advance...
0
jazzIIIlove
Asked:
jazzIIIlove
  • 2
1 Solution
 
hieloCommented:
>>I mean i know the answer you will say from the very top
Right. In PHP there is no "main()" like in C. HTML is not even an programming language. It is a markup language. It is not "active" (no functions, loop contructs, etc).

>>...But are there any exceptions you can tell me?
No "exception" per se, but execution begins at line 1. If line one has "include" statement, and the included file has inline code (as opposed to just function definitions), then the inline code of the included file will be executed. Once all that inline code is executed, then it will continue with line 2 of the "original" file.
0
 
jazzIIIloveAuthor Commented:
to the point answer...
0
 
hieloCommented:
glad to help
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now