ASP.NET Tutoria...login
ASP.NET Tutorial
author:php.cn  update time:2022-04-11 14:18:18

Web Pages PHP


ASP.NET Web Pages -PHP


PHP developers please note that Web Pages can be written in PHP.


WebMatrix supports PHP

At first glance, I think WebMatrix only supports Microsoft technology. This is not correct. In WebMatrix, you can write complete PHP applications.


Creating a PHP Site

In the ASP.NET Web Pages - Creating a Website chapter, you have created an empty page named "Demo" Website with an empty page of type "CSHTML".

Repeat the creation process, create an empty site named "Demo_PHP", check "Enable PHP" (as shown in the figure below), create a blank page of PHP type, and name it "index .php" and you have created your first PHP site.

21.jpg


Create a PHP page

Copy the following code into the "index.php" file:

index.php

<!DOCTYPE html>
<html>
<body>

<?php
phpinfo();
?>


</body>
</html>

Run the file to see a demo of the PHP page.


php.cn