It depends on how PHP is installed on your server; if it is installed as an apache module, then you will use .htaccess files to issue PHP directives, since .htacess is read and executed by Apache.
If you run PHP as CGI, then you will use the php.ini file, since anything in .htaccess will not affect your PHP.
You can check how PHP is installed by creating a php file with phpinfo (); it's in.
This applies only to local overrides for a specific directory; no matter how php is installed, it reads your main php.ini file.
Erik
source share