Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8442489
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T08:51:23+00:00 2026-06-10T08:51:23+00:00

I’m learning how the internet and websites work. I think I understand how .php

  • 0

I’m learning how the internet and websites work. I think I understand how .php files get processed by the PHP processor:

Browser requests webpage ending in .php and sends request to server for that webpage.
Server asks ‘can I find that page?’
If server does not find it, server sends back error.
If server finds page, server asks ‘does file extension end in .html or .php’?
If it ends in .html, server send page back to browser.
If it ends in .php, hand page to PHP processor.
PHP processor scans the page, line by line. It build a processed HTML page.
If it finds HTML, it passes that on as part of the processed HTML page it is building.
If it finds PHP scripts, the PHP processor may or may not output HTML.
When the PHP processor is done, the processed page is handed to the web server for sending to the browser.

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?

In summary, a web page that has PHP code in it needs be have a .php extension. Once the PHP processor encounters <? PHP or <?, the server sends the code to the PHP processor (this wording is probably redundant). The output of the PHP processor can be anything.
Anything includes:

  • Css
  • HTML
  • Javascript?
  • XML?
  • XHTML?
  • Images
  • Sound?
  • Video?
  • Animations such as flash?

Apparently forcing content type may be needed, but it can be done.
HTML is WYSIWYG.
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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T08:51:25+00:00Added an answer on June 10, 2026 at 8:51 am

    HTML is the language of the web. It is a markup language which means that the only thing we can use it for is to “markup” documents, i.e. design how content will look to the end user.

    Imagine we had a page that showed the user the date.

    We could use some HTML to do that:

    <p>Sunday 26 August 2012</p>
    

    But say we wanted to keep that page up to date. We’d have to go and manual change the date manually everyday. Because HTML is static, it can’t be changed dynamically.

    Perhaps it would be useful to be able to generate automatically adding the correct date to the page, depending on when the page is loaded.

    That is where PHP comes in. PHP is a scripting language, and while it can be used for lots of things, one of its main uses is to generate HTML dynamically. So instead of writing in today’s date – what we could do is use some PHP and say.

    <p><? echo date("l j F Y");?></p>
    

    This will print out for me “Sunday 26 August 2012” today, “Monday 27 August 2012” tomorrow, and so on.

    I’d need to save this new version of my page as page.php instead of page.html, because I need my server (which is set up use the PHP) to send the page to PHP interpreter. It will look for the special <?php or <? and try to process what ever it finds. In this case it spits out the correct text for the date on my page and adds it to the page before sending it to the user.

    We can do lots of cool stuff with PHP. It is “server side” technology, meaning that it does its work on the server and then sends us the finished page with all the dynamic content added.

    Sometimes we might want to control and modify a page after it has reached the user’s browser. For this we will need some “client side” technology, i.e. code that runs in the user’s browser. And the most common client side language of choice is javascript.

    Again we can do a lot with Javascript, but most often we use it in web pages to allow us to control elements of a HTML page after it has reached the user.

    We might want to hide something on a page and then only show it once a user has clicked a button. We can do that with javascript.

    Now because Javascript is “client side” technology, i.e. it runs in your browser it can actually be quite hard to use, because you will have to write code that works in a variety of different browsers, and now on mobile phones too! To make this job easier, very smart developers have taken a lot of the pain out of using javascript to control elements in web pages by creating libraries and frameworks to use. One of the most popular of these is the jQuery framework. I think jQuery is the most fun thing to learn, because it allows you to do all of the “cool stuff” in webpages – make stuff fade in, make stuff fade out, play sounds, move elements around etc etc


    I hope this helps you work out how different technologies can help you achieve different things.

    The TL;DR version of this would be:

    HTML & CSS – sets out how your pages are going to look.

    PHP – helps you to generate HTML dynamically.

    JavaScript – helps you make your pages more interactive and can respond to clicks or other actions of your user.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I would like to count the length of a string with PHP. The string
I am trying to understand how to use SyndicationItem to display feed which is
this is what i have right now Drawing an RSS feed into the php,
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have thousands of HTML files to process using Groovy/Java and I need to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.