hi ,
i m creating a zip file of bunch of files . i m sending request via ajax by using jquery . but zip file gives output of few of ascii characters . it doesn’t generate the zip file . but when i test it separately . it works fine . but not with ajax .
looking forward
Thanks
$zipfile = new Ziplib;
$zipfile->zl_add_file($stringData,$_REQUEST['filename'],"g9");
header("Content-type: application/zip");
header("Content-Disposition: attachment; filename=\\"testfile.zip\\"");
echo $zipfile->zl_pack("zip file comments");
this is jquery code
$.ajax({
url:'create_page.php',
type:'POST',
data:'header=' + $('#p_header').val() + '&filename=' + $('#p_filename').val() + '&footer=' + $('#p_footer').val() + '&path=' + $('#p_path').val() + '&page_view=' + $('input[name=page_way]:checked').val() + '&tut_values=' + checkSegmentStatus2,
success:function(results)
{
$('#loading_img').remove();
alert('Your page has been created!');
alert(results);
// $('#loading_div').append('<img src="images/loading.gif" alt="Generating the demos page ..." id="loading_img" />');
}