Php - Course for Beginners in English
PHP is the most popular scripting language on the web. Without PHP Facebook, Yahoo, Google wouldn't have exist. The course is geared to make you a PHP pro. Once you digest all basics, the course will help you create your very own Opinion Poll application.
Just a full form of PHP would be enough to learn this course. This tutorial is designed for beginners with little or no PHP experience.
What is PHP? Write your first PHP Program
PHP is a server side scripting language. that is used to develop Static websites or Dynamic websites or Web applications. PHP stands for Hypertext Pre-processor, that earlier stood for Personal Home Pages.
PHP scripts can only be interpreted on a server that has PHP installed.
The client computers accessing the PHP scripts require a web browser only.
A PHP file contains PHP tags and ends with the extension ".php".
In this tutorial, you will learn-
What is a Scripting Language?
A scripting language is a language that interprets scripts at runtime. Scripts are usually embedded into other software environments.
The purpose of the scripts is usually to enhance the performance or perform routine tasks for an application.
Server side scripts are interpreted on the server while client side scripts are interpreted by the client application.
PHP 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 embedded into HTML pages.
Has all the features needed to develop complete applications. Mostly used for routine tasks
The code has to be compiled before it can be executed The code is usually executed without compiling
Does not need to be embedded into other languages Is usually embedded into other software environments.
PHP code may be embedded into HTML code, or it can be used in combination with various web template systems, web content management system and web frameworks.
Php Syntax
What is PHP? Write your first PHP Program
A PHP file can also contain tags such as HTML and client side scripts such as JavaScript.
HTML is an added advantage when learning PHP Language. You can even learn PHP without knowing HTML but it’s recommended you at least know the basics of HTML.
Database management systems DBMS for database powered applications.
For more advanced topics such as interactive applications and web services, you will need JavaScript and XML.
The flowchart diagram shown below illustrates the basic architecture of a PHP web application and how the server handles the requests.
PHP is open source and free.
Short learning curve compared to other languages such as JSP, ASP etc.
Large community document
Most web hosting servers support PHP by default unlike other languages such as ASP that need IIS. This makes PHP a cost effective choice.
PHP is regular updated to keep abreast with the latest technology trends.
Other benefit that you get with PHP is that it’s a server side scripting language; this means you only need to install it on the server and client computers requesting for resources from the server do not need to have PHP installed; only a web browser would be enough.
PHP has in built support for working hand in hand with MySQL; this doesn’t mean you can’t use PHP with other database management systems. You can still use PHP with
Postgres
Oracle
PHP is cross platform; this means you can deploy your application on a number of different operating systems such as windows, Linux, Mac OS etc.
What is PHP used for & Market share
In terms of market share, there are over 20 million websites and application on the internet developed using PHP scripting language.
This may be attributed to the points raised above;
The diagram below shows some of the popular sites that use PHP
<?php
echo "Hello world";
?>
A PHP file can also contain tags such as HTML and client side scripts such as JavaScript.
HTML is an added advantage when learning PHP Language. You can even learn PHP without knowing HTML but it’s recommended you at least know the basics of HTML.
Database management systems DBMS for database powered applications.
For more advanced topics such as interactive applications and web services, you will need JavaScript and XML.
The flowchart diagram shown below illustrates the basic architecture of a PHP web application and how the server handles the requests.
In the next screen, Change the installation path if required. Click Next
Just a full form of PHP would be enough to learn this course. This tutorial is designed for beginners with little or no PHP experience.
What is PHP? Write your first PHP Program
PHP is a server side scripting language. that is used to develop Static websites or Dynamic websites or Web applications. PHP stands for Hypertext Pre-processor, that earlier stood for Personal Home Pages.
PHP scripts can only be interpreted on a server that has PHP installed.
The client computers accessing the PHP scripts require a web browser only.
A PHP file contains PHP tags and ends with the extension ".php".
In this tutorial, you will learn-
What is a Scripting Language?
- Scripting VS Programming Language
- What does PHP stand for?
- Php Syntax
- Why use PHP?
- What is PHP used for & Market share
- PHP vs ASP.NET VS JSP VS CFML
- PHP File Extensions
- PHP Hello world
What is a Scripting Language?
A script is a set of programming instructions that is interpreted at runtime.A scripting language is a language that interprets scripts at runtime. Scripts are usually embedded into other software environments.
The purpose of the scripts is usually to enhance the performance or perform routine tasks for an application.
Server side scripts are interpreted on the server while client side scripts are interpreted by the client application.
PHP 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 embedded into HTML pages.
Programming Language Vs Scripting Language
Programming language Scripting languageHas all the features needed to develop complete applications. Mostly used for routine tasks
The code has to be compiled before it can be executed The code is usually executed without compiling
Does not need to be embedded into other languages Is usually embedded into other software environments.
What does PHP stand for?
PHP means - Personal Home Page, but it now stands for the recursive backronym PHP: Hypertext Preprocessor.PHP code may be embedded into HTML code, or it can be used in combination with various web template systems, web content management system and web frameworks.
Php Syntax
What is PHP? Write your first PHP Program
A PHP file can also contain tags such as HTML and client side scripts such as JavaScript.
HTML is an added advantage when learning PHP Language. You can even learn PHP without knowing HTML but it’s recommended you at least know the basics of HTML.
Database management systems DBMS for database powered applications.
For more advanced topics such as interactive applications and web services, you will need JavaScript and XML.
The flowchart diagram shown below illustrates the basic architecture of a PHP web application and how the server handles the requests.
What is PHP? Write your first PHP Program
Why use PHP?
You have obviously head of a number of programming languages out there; you may be wondering why we would want to use PHP as our poison for the web programming. Below are some of the compelling reasons.PHP is open source and free.
Short learning curve compared to other languages such as JSP, ASP etc.
Large community document
Most web hosting servers support PHP by default unlike other languages such as ASP that need IIS. This makes PHP a cost effective choice.
PHP is regular updated to keep abreast with the latest technology trends.
Other benefit that you get with PHP is that it’s a server side scripting language; this means you only need to install it on the server and client computers requesting for resources from the server do not need to have PHP installed; only a web browser would be enough.
PHP has in built support for working hand in hand with MySQL; this doesn’t mean you can’t use PHP with other database management systems. You can still use PHP with
Postgres
Oracle
MS SQL Server
ODBC etc.PHP is cross platform; this means you can deploy your application on a number of different operating systems such as windows, Linux, Mac OS etc.
What is PHP used for & Market share
In terms of market share, there are over 20 million websites and application on the internet developed using PHP scripting language.
This may be attributed to the points raised above;
The diagram below shows some of the popular sites that use PHP
PHP Hello world
The program shown below is a basic PHP application that outputs the words “Hello World!” When viewed in a web browser.<?php
echo "Hello world";
?>
A PHP file can also contain tags such as HTML and client side scripts such as JavaScript.
HTML is an added advantage when learning PHP Language. You can even learn PHP without knowing HTML but it’s recommended you at least know the basics of HTML.
Database management systems DBMS for database powered applications.
For more advanced topics such as interactive applications and web services, you will need JavaScript and XML.
The flowchart diagram shown below illustrates the basic architecture of a PHP web application and how the server handles the requests.
Why use PHP?
You have obviously head of a number of programming languages out there; you may be wondering why we would want to use PHP as our poison for the web programming. Below are some of the compelling reasons.
- PHP is open source and free.
- Short learning curve compared to other languages such as JSP, ASP etc.
- Large community document
- Most web hosting servers support PHP by default unlike other languages such as ASP that need IIS. This makes PHP a cost effective choice.
- PHP is regular updated to keep abreast with the latest technology trends.
- Other benefit that you get with PHP is that it’s a server side scripting language; this means you only need to install it on the server and client computers requesting for resources from the server do not need to have PHP installed; only a web browser would be enough.
- PHP has in built support for working hand in hand with MySQL; this doesn’t mean you can’t use PHP with other database management systems. You can still use PHP with
- Postgres
- Oracle
- MS SQL Server
- ODBC etc.
PHP is cross platform; this means you can deploy your application on a number of different operating systems such as windows, Linux, Mac OS etc.
What is PHP used for & Market share
In terms of market share, there are over 20 million websites and application on the internet developed using PHP scripting language.
This may be attributed to the points raised above;
The diagram below shows some of the popular sites that use PHP
PHP vs Asp.Net VS JSP VS CFML
ASP – Active Server Pages, JSP – Java Server Pages, CFML – Cold Fusion Markup language The table below compares the various server side scripting languages with PHP
| FEATURE | PHP | ASP | JSP | CFML |
|---|---|---|---|---|
| Learning curve | short | Longer than PHP | Longer than PHP | Longer than PHP |
| Web hosting | Supported by almost all hosting servers | Needs dedicated server | Fairly supported | Needs dedicated server |
| Open source | Yes | No | Yes | Both commercial and open source |
| Web services support | Built in | Uses the .NET framework | Uses add on libraries | Built in |
| Integration with HTML | Easy | Fairly complex | Fairly complex | Easy |
| MySQL support | Native | Needs third party drivers | Needs third party drivers | Current version has native support. Older versions use ODBC |
| Easily extended by other languages
PHP File Extensions
File
extension and Tags In order for the server to identify our PHP files and scripts,
we must save the file with the “.php”
extension. Older PHP file extensions include
PHP was
designed to work with HTML, and as such, it can be embedded into the HTML code.
You can
create PHP files without any html tags and that is called Pure PHP file .
The
server interprets the PHP code and outputs the results as HTML code to the web
browsers.
In order
for the server to identify the PHP code from the HTML code, we must always
enclose the PHP code in PHP tags.
A PHP tag
starts with the less than symbol followed by the question mark and then the
words “php”.
PHP is a
case sensitive language, “VAR” is not the same as “var”.
The PHP
tags themselves are not case-sensitive, but it is strongly recommended that we
use lower case letter. The code below illustrates the above point.
<?php … ?>
We will
be referring to the PHP lines of code as statements. PHP statements end with a
semi colon (;). If you only have one statement, you can omit the semi colon. If
you have more than one statement, then you must end each line with a semi
colon. For the sake of consistency, it is recommended that you always end your
statement(s) with a semi colon. PHP scripts are executed on the server.
The output is returned in form of HTML
.
PHP Hello world
The
program shown below is a basic PHP application that outputs the words “Hello
World!” When viewed in a web browser.
<?php
echo "Hello world";
?>
Output:
Hello world
Summary
How to Download & Install XAMPP & NetBeans: PHP Tutorial
What is XAMPP?
XAMPP
is an open source cross platform web server, MySQL database engine, and PHP and Perl package. It is compiled and
maintained by apache. The acronym XAMPP stands for;
Why
use XAMPP?
In
this tutorial, you will learn-
How to Download and Install XAMPP
We
look into step by step process to install XAMPP for Windows. For Other
Operating Systems, installation steps are similar.
| No | Extended using Java classes and libraries. | Yes |
In the succeeding screen, click next
In the next screen select Apache and MySQL. You may optionally select FileZilla (FTP Client) if needed. Click Install
Note a service is a long-running program in windows that does not require user intervention. Services can be set to run automatically whenever the windows operating system is started. For you to use Apache and MySQL, they are supposed to be running in the background. Installing them as services runs both Apache and MySQL automatically in the background whenever you power up your computer. If you have not installed Apache and MySQL as services, then you have to manually start them every time that you want to use them. You will have to do this from the XAMPP control panel.PHP and
On successful completion of installation, you will see following window
Click on Finish button
Before we test our XAMPP installation, let’s first look at the basic directories that we will be working with.
Basic Web server configuration
This tutorial assumes that you have installed XAMPP on drive C in Windows using the steps mentioned above. The following is a list of the basic directories that you are supposed to be aware of.









Análisis SEO y SMO de Canal de YouTube. Lleva tu canal al siguiente nivel con nuestro Analizador SEO y SMO para YouTube. Esta herramienta gratuita escanea tu canal y tus videos para darte un informe claro y accionable. https://www.herramientasproductivas.com/youtube_analysis.php
ReplyDelete