我有一个PHP网站,我正在学习PHP,它位于Linux服务器上.如何在不与当前PHP代码冲突的情况下运行此C#代码?当我打开URL时site.com/hello.cs,它只是将整个内容显示为文本?在服务器上运行此代码需要什么?
public class Hello1
{
public static void Main()
{
System.Console.WriteLine("Hello, World!");
}
}
Run Code Online (Sandbox Code Playgroud) 我有以下xml文件:
<os:tax>
<os:cat name="abc" id="1">
<os:subcat name="bcd" id="11">
<os:t name="def" id="111">
<os:cut name="hello" id="161" cutURL="/abc/a.html"/>
<os:cut name="hello2" id="162" cutURL="/abc1/a1.html"/>
<os:cut name="hello3" id="163" cutURL="/abc4/a3.html"/>
</os:t>
</os:subcat>
</os:cat>
<os:cat name="def" id="2">
<os:subcat name="bcd" id="22">
<os:t name="def" id="222">
<os:cut name="hello" id="171" cutURL="/abcs/a.html"/>
<os:cut name="hello2" id="172" cutURL="/abcs1/a1.html"/>
<os:cut name="hello3" id="173" cutURL="/abcs4/a3.html"/>
</os:t>
</os:subcat>
</os:cat>
</os:tax>
Run Code Online (Sandbox Code Playgroud)
它是一个更大的文件,有很多os:cat.我需要获取字符串值:os:cat - > id,name os:subcat - > id,name os:t - > id,name os:cut - > id,name,cutURL
到目前为止我有这个:
XmlNodeList tax = xmlDoc.GetElementsByTagName("os:tax");
foreach (XmlNode node in tax)
{
XmlElement cat …Run Code Online (Sandbox Code Playgroud)