pls coder help me correct this download page

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    pls coder help me correct this download page

    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 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...
    Last edited by arnage; 19.10.12, 09:17.

    #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

    Comment


      #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..

      Comment


        #4
        Originally posted by ajit55u View Post
        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

        Comment

        Working...
        X