Note that there are some explanatory texts on larger screens.

plurals
  1. POHow does PHP interact with HTML and vice versa?
    primarykey
    data
    text
    <p>I'm learning how the internet and websites work. I think I understand how .php files get processed by the PHP processor:</p> <p>Browser requests webpage ending in .php and sends request to server for that webpage.<br> Server asks 'can I find that page?'<br> If server does not find it, server sends back error.<br> If server finds page, server asks 'does file extension end in .html or .php'?<br> If it ends in .html, server send page back to browser.<br> If it ends in .php, hand page to PHP processor.<br> PHP processor scans the page, line by line. It build a processed HTML page.<br> If it finds HTML, it passes that on as part of the processed HTML page it is building.<br> If it finds PHP scripts, the PHP processor may or may not output HTML.<br> When the PHP processor is done, the processed page is handed to the web server for sending to the browser.</p> <p>Does HTML still provide structure to a .php file, the same way HTML provides structure to a webpage that also uses CSS? When I say structure I mean divisions, and head and body sections. Structure as in the bare bones skeleton of the webpage. It seems that on some web pages, there's more PHP than there is HTML. Sometimes there's the bare minimum HTML, and the rest is PHP and Javascript, is this the way webpages were made to be?</p> <p>In summary, a web page that has PHP code in it needs be have a .php extension. Once the PHP processor encounters <code>&lt;? PHP</code> or <code>&lt;?</code>, the server sends the code to the PHP processor (this wording is probably redundant). The output of the PHP processor can be anything. <br> Anything includes: <ul> <li>Css</li> <li>HTML</li> <li>Javascript?</li> <li>XML?</li> <li>XHTML?</li> <li>Images</li> <li>Sound?</li> <li>Video?</li> <li>Animations such as flash?</li> </ul> <br> Apparently forcing content type may be needed, but it can be done.<br> HTML is WYSIWYG. <br> To control and manipulate a web page after it has reached the user's browser, Javascript can be used. With the advent of mobile devices and a few different types of browsers, jQuery was invented to make the developing Javascript programs easier.<br></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload