更改" config.php"的内容来自ajax / jQuery的文件或同一目录中的任何其他php文件

时间:2014-05-13 09:18:59

标签: php jquery fopen

我为项目创建了一个 config.php 文件来存储基本数据库和应用程序设置。

我的 config.php 内容如下:

<?php

define("SQL_IP", "127.0.0.1"); // ip address of mysql database 
define("SQL_USER", "root");  // username for connecting to mysql
define("SQL_PWD","root"); // password for connecting to mysql
define("SQL_DATABASE","campus"); // database where you have executed sql scripts

define("WEB_SITE_URL","http://localhost/campus/"); // the url where you installed this script . do not delete last slash  
define("USE_MATH", "no"); // yes , no . if you want to use math symbols , you have to enable it
define("DEBUG_SQL","no"); // enable it , if you want to view sql queries .
define("PAGING","30");  // paging for all grids

define("MAIL_FROM", ""); //  Your mail address 
?>

现在我要改变 define("SQL_DATABASE","campus")
define("SQL_DATABASE","campus2");

如何通过发送ajax请求或任何php文件来实现。

谢谢和问候!!

0 个答案:

没有答案