Hello. I´m absolutely new as web designer for mobile phones and I have some doubts how to start.
First I need is know how to force the download of a file with extension .py, instead of open it with the browser as a textpage.
I have that code in PHP that works in IE at PC, but not in my NokiaE65. I´d like to know why.
Thank you very much
PHP Code:<?php
$extensiones = array("py"); // extensiones que permitiremos
$f = $_GET["f"];
if(strpos($f,"/")!==false){
die("No puedes navegar por otros directorios");
}
$ftmp = explode(".",$f);
$fExt = strtolower($ftmp[count($ftmp)-1]);
if(!in_array($fExt,$extensiones)){
die("<b>ERROR!</b> no es posible descargar archivos con la extensión $fExt");
}
header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=\"$f\"\n");
$fp=fopen("$f", "r");
fpassthru($fp);
?>







