//base_path()获取当前的绝对路径
$path=base_path().'\config\web.php';

$str='abcdefg'; //要声明的字符串

file_put_contents($path,$str);//把字符串内容存储到web.php中。

  

相关文章: