iFocus.Life News News - Breaking News & Top Stories - Latest World, US & Local News,Get the latest news, exclusives, sport, celebrities, showbiz, politics, business and lifestyle from The iFocus.Life,

How to Insert PHP Into the Center of an HTML File

104 11
    • 1). Launch your text or HTML editor and create a new file. Save the file as "index.php."

    • 2). PHP code begins with "<?php" and ends with "?>." The PHP "echo" command causes a display of the associated string. Insert the following example coding into the document:

      <html>

      <head>

      <title>Welcome</title>

      </head>

      <body>

      <h1><?php echo 'Welcome to My Site!'; ?></h1>

      </body>

      </html>

    • 3). Save the file and transfer the page to your server using an FTP client, such as WSFTP or Dreamweaver. View your page online with a Web browser. The page will display the data "Welcome to My Site!"

Subscribe to our newsletter
Sign up here to get the latest news, updates and special offers delivered directly to your inbox.
You can unsubscribe at any time
You might also like on "Technology"

Leave A Reply

Your email address will not be published.