21,893
社区成员




$host = $_POST['host'];
//……省略,获取信息
//定义要写入的字符串,类似
//<?php
//$host = "location";
//$hostuser = "root"; ............
//?>
$writestring = "<?php\n\r$host=\"".$host."\";\n\r……省略?>";
//写入config.php文档
file_put_contents("config.php",$writestring);
file_put_contents("config.php", '<?php echo "HELLO WORLD!";?>');//数据随你组装
//数据库配置信息,都是你自己填写的