添加en和zh
This commit is contained in:
31
submit.php
Normal file
31
submit.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
header('Content-type:text/html;charset=utf-8');
|
||||
setlocale(LC_ALL, 'zh_CN'); // 设置为中文地区信息
|
||||
|
||||
function goback(){
|
||||
//重定向浏览器
|
||||
header("Location: http://127.0.0.1:8000/zh/acquire_services/goback");
|
||||
//确保重定向后,后续代码不会被执行
|
||||
exit;
|
||||
}
|
||||
|
||||
function writeParam(){
|
||||
$fp = fopen('custform.csv', 'a');
|
||||
$time = date('Y-m-d H:i:s',time());
|
||||
$com = iconv("UTF-8", "GB2312//IGNORE", $_POST['company']);
|
||||
$email = iconv("UTF-8", "GB2312//IGNORE", $_POST['email']);
|
||||
$topic = iconv("UTF-8", "GB2312//IGNORE", $_POST['topic']);
|
||||
$content = iconv("UTF-8", "GB2312//IGNORE", $_POST['content']);
|
||||
fputcsv($fp,array($com,$email,$topic,$content,$time));
|
||||
fclose($fp);
|
||||
|
||||
goback();
|
||||
}
|
||||
|
||||
function writeTxt(){
|
||||
$myfile = fopen("outyyyy.txt", "w") or die("Unable to open file!");
|
||||
fwrite($myfile,$_POST['company']);
|
||||
fclose($myfile);
|
||||
}
|
||||
|
||||
writeParam();
|
||||
Reference in New Issue
Block a user