Dynamic pages - server-side
Dynamic pages:
Page is built by a program
(rather than static pre-built page).
Where should the program to build the page be run?
On the server or client?
Or both?
When should the program run on the server?
Basically: If it has to run on the server.
Can't run on client.
e.g.
Interact with server database.
Introduction to server-side scripting with PHP
PHP is far from the only server-side technology.
But it is widespread and popular.
Generic server-side scripting
CGI (Common Gateway Interface)
is the oldest way of putting a program on the server side.
- CGI scripts
- It is language independent. Any program in a special directory (normally cgi-bin)
can be addressed over the Web.
- Can put any program at all on the Internet.
- It is less used now.
Dedicated server-side solutions integrated with the web server (like PHP) are preferred,
rather than just a directory of standalone programs.
Java server-side
Microsoft ASP
Javascript server-side