请求一段PHP代码转成ASP代码

来源:百度知道 编辑:UC知道 时间:2024/05/17 08:16:12
<?php
$playerPath = urldecode($_GET["playerPath"]);
$to = urldecode($_GET["toEmail"]);

$subject = "Message from your friend";

$from_header = "MIME-Version: 1.0"."\r\n";
$from_header .= "Content-type: text/html; charset=iso-8859-1"."\r\n";
$from_header .= "From: ".urldecode($_GET["fromEmail"]);

$imgPath = urldecode($_GET["imgPath"]);
$playerPage = urldecode($_GET["playerPage"]);

$file = $playerPath."stafTemplate.html";
$f = fopen($file, "r");
$content = fread($f, 8192);
fclose($f);
$content = str_replace(array('[videoPage]','[imgPath]'), array($playerPage, $imgPath), $content);

mail($to, $subject, $content, $from_header);

echo "status=sent";
?>
<?php
$s_link = (

你这个是生成邮件发送页面并发送邮件的代码么,看的一些懂
但asp不是很懂呢 怎么办呢?
粗略的写下
<%
$playerPath = urldecode($_GET["playerPath"]);
$to = urldecode($_GET["toEmail"]);

$subject = "Message from your friend";

$from_header = "MIME-Version: 1.0"."\r\n";
$from_header .= "Content-type: text/html; charset=iso-8859-1"."\r\n";
$from_header .= "From: ".urldecode($_GET["fromEmail"]);

$imgPath = urldecode($_GET["imgPath"]);//得到传值,应该等同与aspasp的request.querystring["imgPath"]
$playerPage = urldecode($_GET["playerPage"]);

$file = $playerPath."stafTemplate.html";//定义要打开的文件路径
$f = fopen($file, "r");//获取文件数据流
$content = fread($f, 8192);//读取文件
fclose($f);//关闭数据流
$content = str_replace(array('[videoPage]','[imgPath]'), array($playerPage, $imgPath), $con