Hello,
I have the following script within a loop from a database output:
$filetemp = $amrdirpath.$row[amrPath].'.amr';
echo $filetemp; / temp debuging/
$amr = fopen($filetemp, 'rb');
$contents = fread($fp, filesize($filetemp));
$zipTest->add_file($fp, $amrpath2);
fclose($fp);
I'm using it to add an amr file (music) one by one to a zip file. Now the zip file creates fine and I can add text files to it but these amr files I'm having problems with.
I'm told I need to read it as binary, any idea? I'm getting the following error messages:
../tracks/amr/e8891fc8afba7b78a3e1970aa44cfd9b.amr
Warning: Supplied argument is not a valid File-Handle resource in c:\foxserv\www\stayaround\secure\getfile.php on line 101
Warning: fopen("", "r") - No error in c:\foxserv\www\stayaround\secure\zipclass.php on line 62
Warning: Supplied argument is not a valid File-Handle resource in c:\foxserv\www\stayaround\secure\zipclass.php on line 63
Warning: Supplied argument is not a valid File-Handle resource in c:\foxserv\www\stayaround\secure\zipclass.php on line 64
Warning: Supplied argument is not a valid File-Handle resource in c:\foxserv\www\stayaround\secure\getfile.php on line 103
../tracks/amr/m6kogdp7ky40datv5s53d3uxxugtmse.amr
Warning: Supplied argument is not a valid File-Handle resource in c:\foxserv\www\stayaround\secure\getfile.php on line 101
Warning: fopen("", "r") - No error in c:\foxserv\www\stayaround\secure\zipclass.php on line 62
Warning: Supplied argument is not a valid File-Handle resource in c:\foxserv\www\stayaround\secure\zipclass.php on line 63
..........
Oh and there is nothing wrong with the zipclass.php file.
Thanks,
Eddie.