Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Standard view
Full view
of .
Look up keyword
Like this
0 of .
Results for:
No results containing your search query
P. 1
PHP Notes

PHP Notes

Ratings: (0)|Views: 1,488 |Likes:
Published by nimyakrishnan

More info:

Published by: nimyakrishnan on Feb 21, 2010
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less





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 Scripting
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
the web pages to be scripted. ie. Change in content depending on user input, environmentalconditions and variables.Client side scripts are two types. External Scripts and Embedded scripts.The scripts can write within the HTML codes then it is called embedded scripts. Sometimesscripts can write in a separate file and called when needed .This is called external scripts.When client request, demanded files are sent to the client’s computer by the corresponding webserver. The user's web browser executes the script and displays the document, including visibleoutput from the script.Client side may also contain instruction for browser to follow if the user interacts withdocument eg: clicking button.These instructions can be followed without the communication with server. The client sidescripts can see be seen by the users but can't change it.
Server ScriptingClient Scripting
1.Done at the server side.2.Script executed by the web server of server.
Produced output can understand by web browser (DHTML).4.User can't see source code unless author publishescode.5.They have greater access to the information andfunctions available on the server.6.Server side scripts require language interpreteinstalled on server regardless of the client's web browser,OS or System calls.
Eg: PHP, ASPDone at client sideExecuted by web browser of client.Output is the display of execution of script.User can see source code.They have great access to the information andfunctions available on the user's browser.Client side scripts do not require any additionalsoftware on the server. But requires web browser which understands the scriptinglanguage.Eg; Javascript, VB script.
Web server
Web server is a computer program that is responsible for accepting HTTP requests from clientsand serving them HTTP responses along with optional data contents.
HTML Basics
Hyper Text Markup Language is the first member of SGML (Standard Generalized Markup
Language). It is used to design layout of the documents and to specify Hyperlinks. HTMLcontains tags and attributes. Tag is coded HTML command that defines how part of web pageshould be displayed. Attribute is a special word used inside the tag to specify additionalinformation to tag. Eg: bgcolor, size.
Format of HTML:
Tags and attributesWAMP and LAMP
Ques: What are the reasons for selecting LAMP (Linux, Apache, MySQL, Php) instead of combination of other software programs, servers and operating systems?All of those are open source resource. Security of linux is very very more than windows.Apache is a better server that IIS both in functionality and security. Mysql is world most popular open source database. PHP is faster than ASP or any other scripting language.
Dream weaver
Macromedia Dream weaver 8 is a professional HTML editor for designing, coding, anddeveloping websites, web pages, and web applications. Whether you enjoy the control of hand-coding HTML, or prefer to work in a visual editing environment, Dreamweaver provides youwith helpful tools to enhance your web creation experience.This guide introduces you to using Macromedia Dreamweaver 8 if you’re unfamiliar with anymajor aspect of it.The tutorials in this guide lead you through the process of creating a simple butfunctional website.Macromedia Dreamweaver 8 is a professional HTML editor for designing, coding, anddeveloping websites, web pages, and web applications. Whether you enjoy the control of hand-

Activity (34)

You've already reviewed this. Edit your review.
1 thousand reads
1 hundred reads
Kanakaiah Kedam added this note
trskaran liked this
sur4ch liked this
Joseph Mwangi liked this
Suraj Waghmare liked this
James Kagwima liked this

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->