1PHP can generate dynamic page content.
2PHP can create, open, read, write, delete, and close files on the server.
3PHP can collect form data.
4PHP can send and receive cookies.
5PHP can add, delete, modify data in your database.
6PHP can be used to control user-access.
7PHP can encrypt data and apply validation.
8PHP used to send and receive E-Mails.
9PHP can be used to integrate with other third party tools.
10PHP can output images, PDF files, and even Flash movies. You can also output any text, such as XHTML and XML.
11
1<html>
2
3 <head>
4 <title>Reading a file using PHP</title>
5 </head>
6
7 <body>
8
9 <?php
10 $filename = "tmp.txt";
11 $file = fopen( $filename, "r" );
12
13 if( $file == false ) {
14 echo ( "Error in opening file" );
15 exit();
16 }
17
18 $filesize = filesize( $filename );
19 $filetext = fread( $file, $filesize );
20 fclose( $file );
21
22 echo ( "File size : $filesize bytes" );
23 echo ( "<pre>$filetext</pre>" );
24 ?>
25
26 </body>
27</html>
28
1PHP is an acronym for "PHP: Hypertext Preprocessor" PHP is a widely-used, open source scripting language. PHP scripts are executed on the server.
1PHP is a general-purpose scripting language especially suited to web development. It was originally created by Danish-Canadian programmer Rasmus Lerdorf in 1994; the PHP reference implementation is now produced by The PHP Group
2Implementation language: C (primarily; some components C++)
3Stable release: 7.4.11 / October 1, 2020; 5 days ago
4Preview release: 8.0.0 Release Candidate 1 / October 1, 2020; 5 days ago
5Typing discipline: Dynamic, weak since version 7.0: Gradual
6Designed by: Rasmus Lerdorf
7Developer: The PHP Development Team, Zend Technologies
1PHP stood for Personal Home Page now it stands for Hypertext Pre-processor.
2PHP is an open-source, interpreted, and object-oriented scripting language that can be executed at the server-side.
3PHP is well suited for web development. Therefore, it is used to develop web applications (an application that executes on the server and generates the dynamic page).
4PHP was created by Rasmus Lerdorf in 1994 but appeared in the market in 1995.Most of PHP syntax is based on C. It is used to manage dynamic content, databases, session tracking, even build entire e-commerce sites.
5PHP is powerful enough to be at the core of the biggest blogging system on the web (WordPress)!
6PHP is deep enough to run the largest social network (Facebook)!
7PHP is also easy enough to be a beginner's first server side language!
1PHP files can contain text, HTML, CSS, JavaScript, and PHP code.
2PHP code is executed on the server, and the result is returned to the browser as plain HTML.
3PHP files have extension ".php