Archive

Posts Tagged ‘files’

Función PHP para forzar la descarga de archivos

September 9th, 2009 Jose Robinson No comments

El título lo dice todo:

function force_download($file)
{
    if ((isset($file)) && (file_exists($file)))
    {
       header("Content-length: ".filesize($file));
       header('Content-Type: application/octet-stream');
       header('Content-Disposition: attachment; filename="' . $file . '"');
       readfile("$file");
    }
    else
    {
       echo "No se ha seleccionado ningún fichero";
    }
}

FUENTE: 21 Really Useful & Handy PHP Code Snippets

Categories: webdev Tags: ,

7 plugins útiles para carga de archivos

July 9th, 2009 Jose Robinson No comments

Si eres desarrollador web me imagino que alguna vez necesitaste hacer un script para hacer upload de archivos y si no algún día lo necesitaras, aquí te tengo 7 plugins para no coger mas lucha, hay uno para cada gusto.

FUENTE: 7 Useful file upload plugins

Categories: webdev Tags: , ,