Assume if I want to change the value of
php_value post_max_size 20M in .htaccess post_max_size 20M in php.ini
Both will do same operation. So
Apache is the HTTP server. It is configured with a .htaccess file placed in the root of the website/Application means every application has its own .htaccess file.
php.ini is the fastest way to affect PHP's functionality.