When you want to debug certain sections of code with in an environment without restarting Apache or NGINX, there’s a template I use for displaying print messages.
PHP
Posted on:
PHP Ini File
Sometimes when you are using php you need to change some of the settings, this can be done by using the ini file. Before you change anything in the ini file you should check the phpinfo. This can be done by creating a file containing <?php phpinfo(); ?> and then […]
PHP
Posted on:
Do you know the difference between echo and print in PHP?
There isn’t very many differences they both can be used to output to the page, however print also returns a 1.
PHP
Posted on:
How do you get the JSON body in PHP?
$_POST doesn’t always get you what you need. If you are passing in JSON as the body of a request, you can’t get it using $_POST. You will have to use file_get_contents(‘php://input’);. I found this to be extremely annoying and not well documented.