I would like to create a zp file using the function system. My problem is that the strings that designate path contain blank space which results in spliting my path in two parts and hence error. How can I form my string so that a blank space in it is interpreted as a part of the path.
Code: Select all
$filen="F:/user/Apache Group/Apache/htdocs/tmp/";
$file_name=$filen.$_POST["Path"];
$file_n[0]=$file_name.".dbf";
$file_n[1]=$file_name.".doc";
$file_n[2]=$file_name.".pdf";
$dowpf = $filen."download.zip";
$com = "F:/user/tool/arch/zip.exe ".$dowpf." " .$file_n[0]." ".$file_n[1]." ".$file_n[2];
system($com);Obviously the blank space between Apache and Group results in splitting of my path. How can I get around of this problem?zip warning: name not matched: Group//Apache//htdocs//tmp/download.zip
zip warning: name not matched: F://user//Apache
zip warning: name not matched: Group//Apache//htdocs//tmp/ter.dbf
zip warning: name not matched: F://user//Apache
zip warning: name not matched: Group//Apache2//htdocs//tmp/ter.doc
zip warning: name not matched: F://user//Apache
zip warning: name not matched: Group//Apache//htdocs//tmp/ter.pdf
Thank you