Tuesday 2 January 2018

What is PHP?

Php stands for Hypertext Preprocessor

Php is a server side scripting language

It is used to create dynamic and interactive page

Php codes are executed on the server where html are executed on the browser

Extension of php  is .php

Php files can contain html, css, JavaScript and text etc.

Php is open source scripting language.so it is free to download

Php is platform independent so it runs on different operating system like windows, Linux, UNIX etc.

Php can insert, update, and delete data in database

Php can retrieve data from database

Php can use session and cookies

Php can embedded with html, css and JavaScript

Rules for creating php application

Php script starts with <?php and ends with ?>
PHP statements end with a semicolon (;)
echo is used to display or print the output
Php code  can be placed anywhere in the document

Step 1:

Start the XAMPP server
Click on the "Start" button next to "Apache" to start your Apache Web server and also start "MySQL"

Step 2:Create simple.php

<!DOCTYPE html> 
      <html>  
                        <body>  
                            <?php  
                          echo "Welcome to LearningPoint92”;    
                                  ?>  
       </body>
       </html>

        Step 3:
Save your php files in the "htdocs" folder located under the "XAMMP" folder on your C: drive. The file path is "C:\xampp\htdocs" for your Web server

Step 4:
Open the browser (chrome) and type it
localhost/simple.php

Output:

Welcome to LearningPoint92

No comments:

Post a Comment

apply function in R

1) apply function: It takes 3 arguments matrix,margin and function.. Example: m<-matrix(c(1,2,3,4),nrow=2,ncol=2) m #1 indicates it is ap...