将PHP代码转换为C# [英] Convert PHP Code to C#

查看:428
本文介绍了将PHP代码转换为C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将以下PHP代码转换为C#?.



 <?php  

$ to = $ _GET [ to]; // 接收手机号码
$ from = $ _GET [ from]; // 发送手机号码
$ message = urldecode($ _ GET [ message]); // 短信内容


// 您可能希望将此信息记录在数据库中

// 让我们发送一封包含邮件数据的电子邮件
$ email_message = 发送到$ to.\\\
Sent的入站短信来自:$ from\\\
Message:$ message
;
mail( email@example.com 入站短信,$ message, From:email@example.com);

解决方案

to =

_GET [ to]; // 接收手机号码


from =


How can i convert following php code to C#?.

<?php

$to = $_GET["to"]; //The receiving mobile number
$from = $_GET["from"]; //The sending mobile number
$message = urldecode($_GET["message"]); //SMS content


// You may wish to log this information in a database

// Lets send an email with the message data
$email_message = "Inbound SMS sent to $to.\nSent From: $from\nMessage: $message";
mail("email@example.com", "Inbound SMS", $message, "From: email@example.com");

解决方案

to =


_GET["to"]; //The receiving mobile number


from =


这篇关于将PHP代码转换为C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆