Home  >  Article  >  php教程  >  php生成 php配置文件

php生成 php配置文件

WBOY
WBOYOriginal
2016-06-06 20:00:531280browse

?php //搜集资料 $str_tmp="?php/r/n"; //得到php的起始符。$str_tmp将累加 $str_end="?"; //php结束符 $str_tmp.="$"."name=/"黑马/";/r/n/t"; //加入用户名 $str_tmp.="$"."pass=/"blackhorse/";/r/n"; //加入密码 $str_tmp.="$"."age=/"28/";/r/n"; //加

//搜集资料 

$str_tmp="

$str_end="?>"; //php结束符 

$str_tmp.="$"."name=/"黑马/";/r/n/t"; //加入用户名 

$str_tmp.="$"."pass=/"blackhorse/";/r/n"; //加入密码 

$str_tmp.="$"."age=/"28/";/r/n"; //加入年龄 

$str_tmp.="$"."income=/"4500/";/r/n"; 

$str_tmp.=$str_end; //加入结束符 

 

//保存文件 

$sf="blhorse.php"; //文件名 

$fp=fopen($sf,"w"); //写方式打开文件 

fwrite($fp,$str_tmp); //存入内容 

fclose($fp); //关闭文件 

?>

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn