Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

ASP.NET Web Pages PHP


May 12, 2021 ASP.NET


Table of contents


ASP.NET Web Pages - PHP

This section describes how to write with PHP Web Pages。

PHP developers be aware that Web Pages can be written in PHP.


WebMatrix supports PHP

At first glance, WebMatrix is thought to support only Microsoft's technology. T his is not true. In WebMatrix, you can write complete PHP applications.


Create a PHP site

In ASP.NET Web Pages - Create a Site section, you have created an empty Web site named "Demo" with an empty page of type "CSHTML".

Repeat the process of creating an empty site named "Demo_PHP", check "Enable PHP" (shown below), create a blank page of PHP type, and name it "index.php" so that you can create your first PHP site.

ASP.NET Web Pages PHP


Create a PHP page

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

index.php

<!DOCTYPE html>
<html>
<body>

<?php
phpinfo();
?>


</body>
</html>

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