Mark Richards
Mark Richards

Reputation: 434

Disable mail functions in php BY .htaccess

I want to disable mail functions in PHP by .htaccess throw-out my all project file. I need to do stop all e-mail that send by system in my project so there are many files that use mail() function in my project so there is way to disable mail functions ? I can't access php.ini so it better to do with .htaccess

in .htaccess i write this code but not work:

  php_value  disable_functions  mail

this is not worked but any other way to disable mail function by .htaccess ?

Upvotes: 7

Views: 23101

Answers (2)

FJD
FJD

Reputation: 21

disable_functions only can modificate in php.ini: http://www.php.net/manual/en/ini.core.php#ini.disable-functions

Upvotes: 2

Tsimtsum
Tsimtsum

Reputation: 1021

PHP configuration directive definition in .htaccess depends on server configuration. It can be disable on your webserver. You can put php.ini in your site root and put this directive. Alternatively, you can set this directive on application runtime by

ini_set('disable_functions','mail');

Upvotes: 9

Related Questions