In: PHP
27 Oct 2010Tweet Script authors: Drasko Gomboc and Sankovic Marko. When running automated backup it is a good practice to save exact time when you made backup in your file name. This snippet shows you how to automatically add date and time before extension in your file name. 1 2 3 $filepath = ‘/backup/folder/drasko_gomboc-and-sankovic_marko.txt’; $new_filepath = preg_replace("/(.[^.]*)$/", [...]
In: .htaccess
16 Aug 2010Tweet In order to have nice URLs you could use various techniques. But in case you have a really simple website with pages written in PHP, and URLs pointing to those PHP files like www.example.com/my-page.php, you could set nice URLs using .htaccess only. Using following snippet will let you have URLs like www.example.com/my-page, and still [...]