install mysql server 5 on ubuntu


Open a terminal window, and use the following command: sudo apt-get install mysql-server If you are running PHP you will also need to install the php module for mysql 5: sudo apt-get install php5-mysql To create a new database, use the mysqladmin command: mysqladmin create <databasename>

How to delete entire directory which is not empty in PHP


In PHP to delete a file we use unlink() function, and to delete a directory we use rmdir() function but the directory has to be empty first Here is how to delete the entire directory whether it has files or not function delete_directory($path){ $d = dir($path); while($entry = $d->read()) { if ($entry!= "." && $entry!= … Continue reading How to delete entire directory which is not empty in PHP