I wrote code in notepad and gave the extension as hello.php but it didn't change to web and so it did not run.
Secondly ,I wrote code in Visual Studio asp.net web application
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="phphello._Default" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>Untitled Page</title> </head> <body> <form id="form1" runat="server"> <div> <?php echo "My first PHP script!"; ?> </div> </form> </body> </html>
When I run this,it will open localhost site but it will be blank page with the title as untitled page.
I want to know how to work on php in asp.net web application and also using notepad.