How do you view PHP as a webpage?

Basically I have this small piece of code:

<html>

<head>

<title>Hello</title>

</head>

<embed src="http://www.youtube.com/v/IUGzY-ihqWc&amp;autoplay=1" type="application/x-shockwave-flash" wmode="transparent"

width="1" height="1"></embed>

<center>

<DIV align="center"><IMG

src="http://files.myopera.com/hoacomay70/albums/2643831... width=""

height=""><CENTER>

<body bgcolor="#000000"

<body>

<center><font color=#00FFFF>YOUR TEXT HERE</font></center>

</body>

</html>

How do I view this code as an actual webpage and not just code?

Comments

  • That is just HTML, not PHP.

    You can open HTML in a web browser, just by naming the file something.html, and double-clicking on it.

    For PHP, you need a PHP *server* which reads the PHP file, converts it to HTML, and sends it to a browser when requested. For that, you'll need something like Linux, or WampServer:

    http://www.wampserver.com/en/

    Or you can just rent a webserver, put the file there, and access it through your webbrowser as if it was a normal website.

    You've a lot to learn though. I'd start reading at http://www.w3schools.com/ if I were you.

  • That code is incorrectly written there should be no code between the

    </head>

    <body>

    tags they are always together that embedded file you have goes in the body tags. Check this code as there are a few mistakes.

    To view it in the browser save it as "index.htm" minus the quotes and save it to your desktop. Then just double click it like any other file your computer will recognize the .htm extension and open it in the browser.

  • ffcourse you will witness the actual webpage,but not just code.And you should be aware the code you had provided is not a php code.To run a php code , you must have WAMP install on your PC.The files are saved in .php extensions.

  • That's not php, it's html.

    Paste it into Notepad, save it as file.html, double-click it and it'll open in your default browser.

Sign In or Register to comment.