0% found this document useful (0 votes)
63 views

Oromia State University: School of Science and Technolgy Departement of Information Technolgy Indivdual Assignment

The document discusses PHP and the differences between HTML and PHP. It defines PHP as a server-side scripting language used to develop dynamic websites and web applications. Some key differences between HTML and PHP include: HTML formats content on web pages while PHP adds functionality; HTML code is visible to users while PHP code is processed on the server; and PHP has stricter syntax requirements while HTML is more flexible. The response summarizes the key points from chapters 1 and 2 of the course material within the page limits. Chapter 1 defines scripting languages and differentiates between server-side and client-side scripting. It provides PHP and JavaScript as examples and discusses how they can be embedded in HTML. Chapter 2 compares server-

Uploaded by

nuri mohammed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
63 views

Oromia State University: School of Science and Technolgy Departement of Information Technolgy Indivdual Assignment

The document discusses PHP and the differences between HTML and PHP. It defines PHP as a server-side scripting language used to develop dynamic websites and web applications. Some key differences between HTML and PHP include: HTML formats content on web pages while PHP adds functionality; HTML code is visible to users while PHP code is processed on the server; and PHP has stricter syntax requirements while HTML is more flexible. The response summarizes the key points from chapters 1 and 2 of the course material within the page limits. Chapter 1 defines scripting languages and differentiates between server-side and client-side scripting. It provides PHP and JavaScript as examples and discusses how they can be embedded in HTML. Chapter 2 compares server-

Uploaded by

nuri mohammed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 11

OROMIA STATE UNIVERSITY

SCHOOL OF SCIENCE AND TECHNOLGY


DEPARTEMENT OF INFORMATION TECHNOLGY
INDIVDUAL ASSIGNMENT
Internet programming
Name No
1.Gemeda Hedede 016
1.What is php?what makes it different form HTML?
Php is an open source, a popular server-side scripting language used for the development of dynamic websites, dynamic web
applications, and static websites. php files are dynamic in nature and output will vary depend on browsers.
Php is also relatively easy to learn but not as much as HTML, we need to be carful while writing as it won’t allow if we have
any mistakes in code. php will take relatively more time to learn.
THE DIFFERENCE BETWEEN HTML AND PHP
o Html is hypertext markup language which describes the structure of web page and it is the backbone of front-end of a
website whereas php is an open source, a popular server side scripting language which will be used for development of
dynamic web applications and websites, static websites.
o Html is basically compatible with most of the browsers whereas php is used for server-side development.
o Html is compatible with most of the browsers whereas php also compatible with most of the browsers.
o Html is used to format the content on the website, decides the look of website whereas php is used to make the page
function as expected.
o Html is used to insert text, images, hyperlinks, videos etc. Through hypertext whereas php is used for calculation ,database
connectivity, storing and retrieving data, login, register forms etc.
o Php code has a proper stricter and it is complex as it won’t give expected output if anything wrong in logic or syntax
whereas in html we can write whatever we want anywhere still it give output.
o The output of php script is html as they will be similar to html file which can include both html and php is script code but
for the end user while opening php web page be able to access only html elements.
2.What is meant by PEAR in PHP?
PEAR short for “php Extension and Application Repository” and is pronounced just like the fruit. the purpose of
PEAR is to provide:
 A structured library of open-source code for PHP users.
 A system for code distribution and package maintenance.
 A standard style for code written in PHP, specified here.
 The PHP Extension Community Library(PEAR)
PHP PEAR (Extension and Application Repository) is framework mainly used for reusable PHP components.
It provides an open source code mainly used for code distribution and package maintenance. The code is
divided into package which can be downloaded from php.net .pear.php.net can be used for package
management, release management, and account management.
3.What is the different between server side script and client script?
 Server-side scripting is used at the backend, where the source code is not viewable or hidden at the client side
(browser). On the other hand, client-side scripting is used at the front end which users can see from the
browser.
 When a server-side script is processed it communicates to the server. As against, client-side scripting does not
need any server interaction.
 The client-side scripting language involves languages such as HTML, CSS and JavaScript. In contrast,
programming languages such as PHP, ASP.net, Ruby, ColdFusion, Python, C#, Java, C++,etc.
 Server-side scripting is useful in customizing the web pages and implement the dynamic changes in the
websites. Conversely, the client-side script can effectively minimize the load to the server.
 Server-side scripting is more secure than client-side scripting as the server side scripts are usually hidden from
the client end, while a client-side script is visible to the users.
4.Differentiate the following scripting languages as server side or client side language. You
have to justify your answer.
Perl – Found on all Windows and Linux servers
– Can handle text manipulation tasks
– Old UNIX language
– Excellent web scripting language
PHP (Hypertext Pre-Processor) – Very popular language
– Especially good at connecting to MySQL
– Runs on UNIX and Windows
– HTML-embedded scripting language
– Generate Dynamic content and good User Interface
– Syntax looks like C, JAVA, and PERL
– Server side execution
JSP (Java Server Pages) – Developed by Sun
– Provide server-specific framework like Microsoft’s ASP
– Uses Java
CGI (Common Gateway Interface) – Server-side solution
– Needs to launch separate instance of application for each web request
– Allows direct interaction with users
ASP.NET– Server-side technology to create faster, reliable and dynamic web pages
– Supports .NET framework languages (C#, VB.NET, JScript.NET)
– Provides flexibility to designers and developers to work separately
VBScript– Microsoft’s scripting language
– Client side Scripting language
– Very easy to learn
– Includes the functionality of Visual Basic
JavaScript– Client-side Scripting language
– Easy to use programming language
– Enhance dynamics and interactive features of a web page
– Allows to perform calculation, write interactive games, add special effects,
customize graphic selections, create security passwords
5.Why we need to have comment in PHP?
comment is a line that is not executed as part of the program. Its purpose is to be read by
someone who is looking at the code.
6.Shortly explain what you understand from chapter one and chapter two of this course when
you read. The required criteria is given in the following table
Chapters Page required Copying from slide Giving reference

For chapter 1 Maximum page required is 2 Impossible Possible


For chapter 2 Maximum page required is 2 Impossible Possible
Chapter 1
Scripting Language
Scripting language:
oA scrip is a set of programming instructions that is interpreted at runtime.
oA scripting language that interprets at runtime. Scripts are usually to enhance the performance or perform routine tasks for an
application.
oServer side scripts are interpreted on the server while client side scripts are interpreted by the client application.
oPhp is a server side script that is interpreted on the server while JavaScript is an example of a client side script that is
interpreted by the client browser. Both php and JavaScript can be emended into HTML pages.
Types of Scripting Languages
1.Server-side Scripting Language
2. Client-side Scripting Language
Server-side scripting is used at the backend, where the source code is not viewable or hidden at the client side (browser). On
the other hand, client-side scripting is used at the front end which users can see from the browser.
The client-side scripting language involves languages such as HTML, CSS and JavaScript. In contrast, programming languages
such as PHP, ASP.net, Ruby, ColdFusion, Python, C#, Java, C++,etc.
When a server-side script is processed it communicates to the server. As against, client-side scripting does not need any server
interaction
Server-side scripting is useful in customizing the web pages and implement the dynamic changes in the websites. Conversely,
the client-side script can effectively minimize the load to the server.
Server-side scripting is used at the backend, where the source code is not viewable or hidden at the client side (browser). On
the other hand, client-side scripting is used at the front end which users can see from the browser.
PHP
Php stands for Hypertext Pre-processor
Php is a server side scripting language. This means that is executed on the server. This client applications do not
need to have php installed.
Php files are saved with the “php” file extension, and the php development code is enclosed in tags.
Php is open sorce and cross platform
HTML AND PHP
 Html is hypertext markup language which describes the structure of web page and it is the backbone of front-end
of a website whereas php is an open source, a popular server side scripting language which will be used for
development of dynamic web applications and websites, static websites.
Html is basically compatible with most of the browsers whereas php is used for server-side development.
Html is compatible with most of the browsers whereas php also compatible with most of the browsers.
Html is used to format the content on the website, decides the look of website whereas php is used to make the page
function as expected.
Html is used to insert text, images, hyperlinks, videos etc. Through hypertext whereas php is used for calculation
,database connectivity, storing and retrieving data, login, register forms etc.
Php code has a proper stricter and it is complex as it won’t give expected output if anything wrong in logic or syntax
whereas in html we can write whatever we want anywhere still it give output.
The output of php script is html as they will be similar to html file which can include both html and php is script
code but for the end user while opening php web page be able to access only html elements
Chapter 2
Server Side Scripting Basic
Basis for comparison Server-side scripting Client-side scripting
Basic Works in the back end which could Works at the front end and script are
not be visible at the client end. visible among the users.
Processing Requires server interaction Does not need interaction with the
server.
Languages involved Php,asp.net,ruby on rails , HTML, css ,JavaScript etc.
ColdFusion ,python, etcetera.
Affect Could effectively customize the web Can reduce the to the server
page and provide dynamic websites.
Security Relatively secure Insecure

PHP Comments
 Single line comments start with double forward slashes // and they end in the same line.
 Multiple line comments start with a forward slash followed by the asterisk /* and end with
the asterisk followed by the forward slash */.
o PHP String Variables: Astring variable is used to store and manipulate text. String variables
are used for values that contain characters.
o PHP Concatenation Operator: There is only one string operator in PHP. The concatenation
operator (.) is used to join two string values together.
o PHP string manipulation function: The strlen() function returns the length of a string, in
characters. The strpos() function is used to search for a character or a specific text within a
string.
o PHP Operators :
 Arithmetic operators: used to perform arithmetic operations on numeric data. The
concatenate operator works on strings values too.
 Assignment Operators: used to assign values to variables. They can also be used together
with arithmetic operators.
 Comparison operators: used to compare values and data types.
 Logical operators: When working with logical operators, any number greater than or less
than zero (0) evaluates to true. Zero (0) evaluates to false
Commenting source code is also very important when multiple developers have to work on
the same project.
Thank you

You might also like