ERROR_LOG After you set display_errors = Off in php.ini, the error message began to go background. You might want to know where the error message… Read More »Where is the Default Location of ERROR_LOG in PHP?
PHP provides a global variable $_SERVER['HTTPS'] that can be checked whether the clients are connecting over SSL or not. For example: <?php if (!isset($_SERVER['HTTPS']) ||… Read More »How to Force Clients to Use HTTPS by PHP
Web administrators might have some routine jobs to be executed in the background periodically by triggering PHP web pages. Most of the times, the web… Read More »How to Execute PHP Background Jobs by Disconnecting From Clients
A simple test can show you that session_destroy() does not destroy session variables. <?php session_start(); $_SESSION['timezone'] = "America/New_York"; echo "Session ID before destroy: " .… Read More »session_destroy() Does Not Mean to Destroy Everything
What are the real integers represented by the session status constants PHP_SESSION_DISABLED, PHP_SESSION_NONE and PHP_SESSION_ACTIVE? A simple test can tell us the truth. <?php echo… Read More »What are the Real Integers of Session Status
Using mixed function arguments should notice the right-side principles, which means you must put the default arguments to the rightmost position in the arguments list… Read More »Right-Side Principle for Default Function Arguments Declararion in PHP
Sometimes, we may want to indent the output presented on the browser by padding leading spaces. Furthermore, we want the indentation more elaborate according to… Read More »How to Concatenate a Repeat String N Times
Curl Error: couldn't resolve host Found a Curl error: couldn't resolve host 'domain.name' It seemed that Curl was trying to resolve the domain name, but… Read More »How to Resolve PHP Curl Error: couldn't resolve host