【发布时间】:2020-05-25 05:59:39
【问题描述】:
在后台使用 c# 时是否可以在 asp.net 中使用一些 php 代码。
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="MeineWebseite.löschen.WebForm1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
</head>
<body>
<form id="form1" runat="server">
<?php
echo "Hallo \"Welt\"";
echo $name;
echo " - i'am feeling fine";
function ausgabe ($wert)
{
echo $wert;
}
?>
</form>
</body>
</html>
我想以这种方式使用 php。我应该安装哪个软件包?
【问题讨论】:
-
你试过了吗?
-
是的,我做到了!我尝试使用 peachpie,但效果并不理想
-
你不能只混合两种语言。对于初学者,选择一种语言并学习如何用它编写简单的程序。一段时间后,您可能会查看其他语言,然后了解它们各自的优缺点。
-
好的!我现在明白了。谢谢