Setting PHP variables in httpd.conf?

后端 未结 6 1518
不思量自难忘°
不思量自难忘° 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:20

    Did you tried to use the .htaccess file? You could override the php.ini values using it.

    Just put the .htaccess file into your htdocs directory:

    php_value name value
    

    Futher information:

    • https://php.net/manual/en/configuration.changes.php
    • https://php.net/manual/en/ini.php

提交回复
热议问题