PHP头条
热点:

php使用COPY函数更新配置文件的方法-PHP源码


这篇文章主要介绍了php使用COPY函数更新配置文件的方法,涉及copy函数更新配置信息的相关技巧,需要的朋友可以参考下

本文实例讲述了php使用COPY函数更新配置文件的方法。分享给大家供大家参考。具体如下:

_saveconfig.php文件如下:

config.php配置文件如下:

 'localhost',   //主机名
    'user' => 'root',   //用户名
    'pwd' => '',    //密码
    'db' => 'sino',    //数据库名
    'prefix' => 'sin_'  //数据库前缀
  );
  $gSite = array
  (
    'siteName' => '公司名',   
    'siteNameEn' => 'we are the company',  
    'siteKeywords' => '药物,医药,制药',  
    'siteDescription' => '公司名是一家从事00方面的公司' 
  );
  $gUpload = array
  (
    'dir' => 'uploads',
    'imageWidth' => '120',
    'imageHeight' => '*'  
  );
  $contactus = '';
  $menuhiddenp = "";
  $FROMURL=$_SERVER["HTTP_REFERER"]?$_SERVER["HTTP_REFERER"]:$HTTP_SERVER_VARS["HTTP_REFERER"];
  $dRootDir = '../';
  $conn = mysql_connect($gDb['host'],$gDb['user'],$gDb['pwd']);
  mysql_select_db($gDb['db']) or die('database connect error!'); 
  mysql_query("SET NAMES 'gbk'"); 
?>

www.phpzy.comtrue/php/33540.htmlTechArticlephp使用COPY函数更新配置文件的方法-PHP源码 这篇文章主要介绍了php使用COPY函数更新配置文件的方法,涉及copy函数更新配置信息的相关技巧,需要的朋友可以参考下 本文实例讲述了php使用...

相关文章

PHP之友评论

今天推荐