Posts Tagged "PHP"

How to install PHP from source on CentOS

Posted on Nov 30, 2016

I have recently installed PHP 7 from source on a fresh minimal CentOS 7 box. No previous version of PHP was installed, and I thought I’d give 7 a spin. There were a few pitfalls I hadn’t come...

Learn More

How to create a redirect in PHP

Posted on Dec 4, 2014

Say you had domain.com/folder, and you’d like it to automatically redirect to domain.com/otherfolder, do the following: <?php // redirecting elsewhere header("Location:...

Learn More

How to check the size of a file in PHP

Posted on Mar 18, 2014

PHP has a handy function called filesize() which can help us display how big a file is. It does this in bytes by default, but with a bit of tinkering we can easily convert this into kilobytes or megabytes....

Learn More