Home > php教程 > php手册 > php生成 php配置文件

php生成 php配置文件

WBOY
Release: 2016-06-06 20:00:53
Original
1330 people have browsed it

?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); //关闭文件 

?>

source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template