发新话题
打印

php生成txt文件

php生成txt文件

function totxt($str, $lottName){ if($str) { $title = $lottName.'_'.date('YmdHi').'.txt'; header("Content-Type: application/force-download"); header("Content-Disposition:attachment;filename=".$title); $str = str_replace('
', "\r\n", $str); echo $str; } } $betStr = $_POST['txt']; $lottery = $_POST['lottery']; $lottName = $_MGLOBAL['LOTTERY_NAME'][$lottery]; totxt($betStr, $lottName);

TOP

发新话题