How do I turn on all error and warnings and log them to a file, but to set up all of that within the script (not changing anything in php.ini)?
I want to define a fi
add this code in .htaccess (as an alternative of php.ini / ini_set function):
php_flag log_errors on php_value error_log ./path_to_MY_PHP_ERRORS.log # php_flag display_errors on
* as commented: this is for Apache-type servers, and not for Nginx or others.