Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable mail functions in php BY .htaccess

Tags:

php

.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 ?

like image 274
Mark Richards Avatar asked Mar 16 '13 07:03

Mark Richards


1 Answers

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');
like image 144
Tsimtsum Avatar answered Sep 27 '22 22:09

Tsimtsum