[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details

creating zip files via ajax jquery in php .

Asked by jamie_2008 in PHP Scripting Language, Jquery, Asynchronous Javascript and XML (AJAX)

Tags: php, jquery, ajax, zip

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
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
$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" />');
										 
										   }
[+][-]03/24/09 02:41 PM, ID: 23973728Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/24/09 10:20 PM, ID: 23976248Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/27/09 09:49 AM, ID: 24003005Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-89 - Hierarchy / EE_QW_3_20080625