Currently I am trying to retrieve a file that is located in a zip file which has an apostrophe in it. To achieve this I use the following code:
$filename = $_POST['filename'];
$print = $_POST['print'];
$weborder = $_POST['weborder'];
$url = urlencode($filename);
header("Content-type: application/pdf");
header('Content-disposition: inline; filename='.$filename);
$pdf = file_get_contents('zip://z:/Backup/'.$print.'/'.$weborder.'.zip#'.$url.'');
echo $pdf;
Somehow this only works on files that don't have a special character in them. I tried to decode the filename to UTF-8 but that didn't help either.
So I was wondering if there is a way to open the files with special characters in the name.