Setting PHP variables in httpd.conf?

后端 未结 6 1505
不思量自难忘°
不思量自难忘° 2020-12-24 14:55

I\'d like to automatically change my database connection settings on a per-vhost basis, so that I don\'t have to edit any PHP code as it moves from staging to live and yet a

6条回答
  •  無奈伤痛
    2020-12-24 15:17

    I would not set an environment variable, as this is also visible in default script outputs like PhpInfo();

    just use a php_value in your .htaccess just above the htdocs folder and you're done and safe :)

提交回复
热议问题