Copying files and directories on Linux
The basics of copying files and whole directories on Linux. Copying files on a Linux OS can be done with cp this is obviously short for “copy”. The syntax for…
The basics of copying files and whole directories on Linux. Copying files on a Linux OS can be done with cp this is obviously short for “copy”. The syntax for…
How to filter out page content based on text input value using jQuery. A search input is used to find if the value exists in each div. CodePen example. Explanation…
How to load and display a DataTable with Ajax data on a button click. The Ajax data is from a GET request and once the table is loaded the button…
How to return numerics in JSON data from a PHP PDO MySQL query. Usually and as default all of the data is returned as strings. The following example SELECT code:…
How to check if a file exists on a remote server or network from a URL with PHP. Using file_exists() only works for directory links (files on the system) and…
Building an array in Javascript and filling a text area with the array and clearing it on button click. CodePen example. To build an array in Javascript you need to…
Using jQuery to select text and input values based on closest parameters. CodePen example. closest() will get the first element matching by traversing up, whilst find() will descend until the…
Generating an XML file with data from a MySQL database using the inbuilt SimpleXMLElement class. By using this class you can avoid formatting errors and issues than if you were…
How to do an UPDATE from an INSERT with SQLite when there is a duplicate key value. With SQLite you cannot do the simple MySQL INSERT on duplicate key UPDATE:…
Apache alias is the method to use the filesystem other than under the document root. Setting an alias directory with Apache means that when going to the specified URL path…