Php method for updating configuration files using the COPY function-PHP source code

Source: Internet
Author: User
This article describes how to use the COPY function to update the configuration file in php, and describes how to update the configuration information using the copy function, for more information about how to update the configuration file using the COPY function in php, refer to the next article. This article describes how to update the configuration file using the copy function.

This example describes how php updates the configuration file using the COPY function. Share it with you for your reference. The details are as follows:

The _ saveconfig. php file is as follows:

 

The config. php configuration file is as follows:

 'Localhost', // host name 'user' => 'root', // username 'pwd' => '', // password 'DB' => 'Sino ', // database name 'prefix' => 'Sin _ '// database prefix); $ gSite = array ('sitename' => 'company name ', 'sitenameen' => 'We are the company', 'sitekeyword' => 'medicines, pharmaceuticals ', 'sitedescription' => 'company name is a 00 company '); $ gUpload = array ('dir' => 'upload', 'imagewidth' => '123 ', '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'");?>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.