Category: PHP

PHP: File functions

Opening directory and listing files See the following code: output: To remove certain file name from the list, see the following code: This code lists all files except the ones…

PHP: How to read command-line input

In PHP, all commandline parameter are passed to the $argv array. Following example shows how to use this array: $argv and $argv contain the passed parameters in the order they…

Installing Moodle on Linux

First of all make sure that you have Apache, MySQL (or PostgreSQL), and PHP installed and configured on your system. On Ubuntu, you would type the following to install these…

Installing phpPgAdmin on Ubuntu

phpPgAdmin is a web-based administration tool for PostgreSQL written in PHP. It is a very nifty tool with a very convenient GUI interface. If you have used phpMyAdmin for MySQL,…

Where are PHP error logs

PHP errors are by default set to go to the apache error log. On Ubuntu, the error log is located at /var/log/apache2/error.log. If you are a PHP developer, it is…