Monthly Archive: February 2011

PHP-Mysql

Get Safe File Name

This function come up with a function that does a good job of sanitizing certain strings so that they are safe to use in the URL (like a post slug) and also safe to use as file names.

PHP-Mysql

Uploading file by PHP Code

Let’s start by creating the html file form:
Files are uploaded from the browser using an input tag, with the type parameter set to “file”. This is supported by all browsers currently available on the market.