Dynamic Resources
Explore how to create dynamic PHP resources that produce varying output on each request, unlike static HTML files. This lesson helps you understand the fundamentals of serving PHP scripts and generating content such as random numbers dynamically, which is crucial for building interactive web applications.
We'll cover the following...
We'll cover the following...
Static resources and their limitations
Previously, we looked at serving static resources, in particular index.html and favicon.ico.
These are the things a browser can deal with: it can show an HTML page and use the favicon.ico as a visual icon inside the browser tab.
However, if all we could do was return .html files and images to the browser, we could never build an actual web application.
A .html file can’t do the following:
- It cannot process data that a user provides by filling in a form.
- It cannot talk to a database and