Let's Get Started with a PHP Page!
- Open Notepad++
- Choose:
File -> New
- Copy the First PHP Template (PHP) code (below)
- Paste that code into your new file
- Change the put-title-of-this-page-here,
put-welcome-heading-here, and put-welcome-paragraph-here
strings.
- Click: File -> Save As
- Name your file: \www\variables.php
- Change the
Save as type:
to: PHP Hypertext Preprocessor (*.php)
- Click: Save
- Visit your page (http://buffalo.edu/first.php) in your favorite web browser
- Make any changes
- Save your changes
First PHP Template (PHP)
<!doctype html>
<html>
<head>
<title><?php echo("put-title-of-this-page-here"); ?></title>
<head>
<body>
<h2><?php echo("put-welcome-heading-here"); ?></h2>
<p><?php echo("put-welcome-paragraph here"); ?></p>
</body>
</html>
Output