Batra Computer Centre is An ISO certified 9001:2008 training Centre in Ambala.
We Provide 6 week Industrial Training in php in Ambala. BATRA COMPUTER CENTRE provides best training in C, C++, S.E.O, Web Designing, Web Development and So many other courses are available.
2. BATRA COMPUTER CENTRE
Website: www.batracomputercentre.com Ph.no.: 8222066670, 4000670
Email: info.jatinbatra@gmail.com
What is PHP
Advantages of Using PHP to enhance Web Pages:
Easy to use
Open source
Multiple platform
3. BATRA COMPUTER CENTRE
Website: www.batracomputercentre.com Ph.no.: 8222066670, 4000670
Email: info.jatinbatra@gmail.com
How PHP Pages are Accessed & Interpreted
4. BATRA COMPUTER CENTRE
Website: www.batracomputercentre.com Ph.no.: 8222066670, 4000670
Email: info.jatinbatra@gmail.com
Getting Started with PHP
To develop and publish PHP script all you need is :
A web server with PHP built into it
A client machine with a basic text editor and internet connection
FTP or Telnet software
5. BATRA COMPUTER CENTRE
Website: www.batracomputercentre.com Ph.no.: 8222066670, 4000670
Email: info.jatinbatra@gmail.com
Exploring the basic PHP development process
The basic step you can use to develop and publish PHP pages are:
Create a PHP script file and save to a local disk
Use FTP to copy the file to the server
Access your file using a server
6. BATRA COMPUTER CENTRE
Website: www.batracomputercentre.com Ph.no.: 8222066670, 4000670
Email: info.jatinbatra@gmail.com
Creating a PHP Script File & Saving it to
a local disk
You can use a number of different editors to create your PHP script files.
The PHP script with a <?php tag
and ends with?>
Between these tags is a single
PHP print statement.
7. BATRA COMPUTER CENTRE
Website: www.batracomputercentre.com Ph.no.: 8222066670, 4000670
Email: info.jatinbatra@gmail.com
Alternative PHP Delimiters
You can alternatively start your PHP script with the <script> tag as follows:
-- <script language=“PHP”>
print ( “A simple initial script”);
</script>
If have short_open_tag enabled in its configuration file, you can use<?and ?>
If asp_tags is enabled in the PHP configuration file, you can use < % and % > as
delimiters.
8. BATRA COMPUTER CENTRE
Website: www.batracomputercentre.com Ph.no.: 8222066670, 4000670
Email: info.jatinbatra@gmail.com
Copying Files to a web Server with FTP
Connect to the internet and start
FTP
Connect to your Web server with
FTP
Copy files to the web server
9. BATRA COMPUTER CENTRE
Website: www.batracomputercentre.com Ph.no.: 8222066670, 4000670
Email: info.jatinbatra@gmail.com
Accessing your File Using a Browser
10. BATRA COMPUTER CENTRE
Website: www.batracomputercentre.com Ph.no.: 8222066670, 4000670
Email: info.jatinbatra@gmail.com
Proper Syntax
If you have a syntax error than you have written one or more PHP
statements that are grammatically incorrect in the PHP language
The print statement syntax:
Print ( “your message to print” ) ;
Enclose message
in quotation
marks
Parenthesis are optional
End in a
semi-colon
Message to output
11. BATRA COMPUTER CENTRE
Website: www.batracomputercentre.com Ph.no.: 8222066670, 4000670
Email: info.jatinbatra@gmail.com
If use Improper syntax
1. <?php
2. Print (“A simple initial script);
3. ?>
Suppose you use the wrong syntax
12. BATRA COMPUTER CENTRE
Website: www.batracomputercentre.com Ph.no.: 8222066670, 4000670
Email: info.jatinbatra@gmail.com
If use Improper syntax
1. Be careful to use quotation marks, parentheses, and brackets in
pairs.
2. Most PHP commands end with a semicolon (;)
3. Be careful of case
4. PHP ignores blank spaces
Some PHP syntax Issues: