<HTML>
<HEAD>
<TITLE>POWEREDBYPHP.COM, PHP Tutorial - Lesson 1.2</TITLE>
</HEAD>
<BODY>
<?PHP
$date = Date("l - F d, Y");
print("Hello World<>\n");
print("Today's date is: $date\n");
?>
</BODY>
</HTML>
Showing posts with label PHP. Show all posts
Showing posts with label PHP. Show all posts
Wednesday, June 8, 2011
PHP: Date
PHP: First Program
<html>
<head>
<title>PHP Test Page</title>
</head>
<body>
<center><b>
<?php
print "I like About";
print "<br>";
print "Billy said I like About too"
?>
</b></center>
</body>
</html>
Tuesday, June 7, 2011
PHP: Comments
<?php
//A comment on a single line
/*
Multiple Line
Using this method
you can create a larger block of text
and it will all be commented out
*/
?>
PHP: Introduction
What is PHP?
- PHP is a general-purpose scripting language originally designed for web development to produce dynamic web pages.
- PHP code is embedded into the HTML source document and interpreted by a web server with a PHP processor module, which generates the web page document.
- It also has evolved to include a command-line interface capability and can be used in standalone graphical applications.
- PHP is an open-source language, used primarily for dynamic web content and server-side applications. It is often pointed to as the main competitor with:
- Microsoft's C# - Visual Basic.NET - ASP family,
- Sun's Java - JSP.
- Macromedia's ColdFusion .
- CGI - Perl.
- Start by creating a blank file using any program that can save in plain text format. Save your file as a .PHP file, for example mypage.php.
- Saving a page with the .php extension tells your server that it will need to execute the PHP code. Enter the statement to let the browser know the PHP code is done.
- Every section of PHP code starts and ends by turning on and off PHP tags to let the server know that it needs to execute the PHP in between them. Here is an example: Everything between the is read as PHP code.
<?php
code...
?>
-------------------
Subscribe to:
Posts (Atom)