PHP the completed noteWeb hardware and software Basics
Markup languages like HTML, XML are used for the designing of web pages. For the presentation and appearance CSS is used.
Common Gateway Interface
CGI is the standard protocol that defines how the web server software can assign the generationof web pages to a console application. Such applications are known as CGI scripts. They arewritten in scripting languages. These scripts are executed by operating system and results aregiven back to the web server. But now a day these scripts (PHP, ASP) run directly by the webserver itself or by the extension modules such as mod_pearl, mod_php etc. This is called directexecution.Both of these CGI and direct execution can be used to build complex multi page sites. Butdirect execution results lower overhead due to the lack of calls to the external interpreter.
Ques: How a PHP script can execute using command line?Just run the PHP CLI (Command Line Interface) program and provide the PHP script file nameas the command line argument. For example, "php myScript.php", assuming "php" is thecommand to invoke the CLI program. Be aware that if your PHP script was written for the WebCGI interface, it may not execute properly in command line environment.
Server side scripting and Client side ScriptingServer Scripting
It is the web server technology in which user's request is fulfilled by running a script and theweb server generate dynamic pages. It is used to provide the interactive website that interface tothe databases or data stores.The primary advantage of server scripting is the ability to customize the response based on theneeds, access rights, or queries into databases. In this programmers can write their own server,client and communication protocol that can be only be used with one another. In earlier daysserver scripting was done by the combination of C, Perl and shell scripts using CGI. Eg: ASP/ASP.Net, PHP, JAVA, Java Script, PERL, Ruby, Lasso, JSP, SMX, Python.
Client side scripting is the class of computer programs on the web that are executed at the clientside by the user's web browser. These computer programs are written in Dynamic HTML so tat