Snippet shows you how to get filename from a path in PHP. Filename and extension separately. Can be used for extending filenames with timestamp or anything.
22 Nov, 2016
Select a random file from directory. This can be useful if you want to display a random image on your website. For an example a background image randomly from a directory in your files.
27 Oct, 2016
Ansible add multiple lines to configuration file. Add multiple lines in your configuration file. The line will be replaced with the old one. You can set after what will the line be inserted. Use...
12 Oct, 2016
6 Oct, 2016
Trying to install latest updates got an error. "qt5-base and qtchooser are in conflict" due to the error it was not possible to upgrade the system. The package moved to the base package, so they came...
19 Jul, 2016
21 Sep, 2016
If you need to show user different content whether a table is empty or not. So you would need to count table rows for that. Counting every row will iterate through the table rows and is really slow....
26 Aug, 2016
How to validate AJAX requests in Zend Framework. There is a function in request class, to use instead of comparing the $_SERVER['HTTP_X_REQUESTED_WITH'] directly. This can be beneficial for security...
8 Jul, 2016
There are multiple ways to display text input field. You can use lable or not, you can do some validation with regular expression. Also you can show pretty inline form errors. For more information go...