pls coder help me correct this download page

Started on the old forum in October 2012 · view the original in the archive · old links redirect here

3 replies · 446 views · started 14 years ago · 1 min read

3 participants
Wintch Developer · 68 posts #1

Pls any time i want to download .jar or .jad file extention it does not download when i use 0peramini browser, but instead its downloading the page...But other file type is being downloaded. Diz iz my dwnld code

<?php 

$filed = 'files/'.$info['name'];
$fp=fopen($filed, "rb");
 $ext = strrchr($info['name'],'.');
$truext=str_replace(".","",$ext);
$truext=strtolower($truext);
$ext=strtolower($ext);
$name=str_replace("$ext","(site.name)$ext",$info['name']);

header('Content-type:application/force-download');
        header('Content-disposition: attachment;filename="'.$name.'"');
        header('Content-length: '.$info['size']);
        fpassthru($fp);
        fclose($fp);
    }
} else echo 'file dont exist';
?>

plz wat c0uld b da problem...

ajit55u Developer · 157 posts #2

did you try with .htaccess ?? put mime type for .jar & .jad in your .htaccess page

AddType application/java-archive .jar AddType application/x-java-archive .jar

somethime it wont download cause of .htaccess also try

They Make Rules & I Break Them

hi_jakkk Developer · 52 posts #3

is your operamini browser is also a java and installed at java ph0ne?maybe the ph0ne is n0t supp0rted to download a java file..try to use a symbian ph0ne and download that again using operamini symbian..

Wintch Developer · 68 posts #4

ajit55u wrote: did you try with .htaccess ?? put mime type for .jar & .jad in your .htaccess page

AddType application/java-archive .jar AddType application/x-java-archive .jar

somethime it wont download cause of .htaccess also try

tanx man, i will try dis

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close