too long

I am trying to create a page that simply zips files, that's all there is to it. I added the check to make sure the method was actually being called, and it is, I am seeing the "ok" when the code is run, however, no ZIP file is being created.

Any help would be appreciated. I can confirm that those files exist. (They are in relation to where the php file is)

$zip = new ZipArchive;
if ($zip->open('/files/custom.zip', ZipArchive::CREATE) === TRUE) {
    $zip->addFile('/files/textures/16/default/pack.mcmeta');
    $zip->addFile('/files/textures/16/default/pack.png');
    $zip->close();
    echo "ok";
} else {
    echo "failed";
}

try this

<?php
$zip = new ZipArchive;
if ($zip->open('/files/custom.zip') === TRUE) {
    $zip->addFile('/files/textures/16/default/pack.mcmeta', 'pack.png');
    $zip->close();
    echo 'ok';
} else {
    echo 'failed';
}
?>