Skip to content

Cookie settings

Choose which kinds of cookies you allow. You can change your choice at any time via Cookie settings at the bottom of every page. Privacy statement

Necessary

Always on

Needed to log in, keep your cart and remember your choices. These are always on.

Which cookies?
  • weboke_sessie, weboke_klant, weboke_remember: your session and staying logged in
  • weboke_basket: your cart
  • wkBtwIncl: showing prices with or without VAT
  • wok_cookies: your cookie choice, 12 months

Measures which ad leads to a visit or order, so we do not pay for ads that do nothing.

Which cookies?
  • Google Ads via Google Tag Manager (_gcl_au, _gcl_aw), up to 90 days
  • OpenAI Ads, ads in ChatGPT
  • wok_aff: which partner referred you to us (affiliate programme), 60 days

4.6

Country and language

Each country has its own site, with prices and VAT for that country.

View

Using the PHP zip function without exec

The PHP function exec is disabled on our servers, see PHP security: disabled functions. This means you can't call the server's zip and unzip programs. You don't need to, though: PHP has its own ZipArchive class. You can use it to create zip files and extract them.

Creating a zip file

Save this code as testzip.php, for example in public_html, and open the file in your browser:

<?php
$zip = new ZipArchive();
$bestand = __DIR__ . '/test.zip';

if ($zip->open($bestand, ZipArchive::CREATE) !== true) {
    exit("Het lukt niet om $bestand te openen. Heeft de map schrijfrechten?");
}

$zip->addFile(__DIR__ . '/testzip.php', 'testzip.php');
echo 'Aantal bestanden in de zip: ' . $zip->numFiles;
$zip->close();

Extracting a zip file

<?php
$zip = new ZipArchive();
if ($zip->open(__DIR__ . '/test.zip') === true) {
    $zip->extractTo(__DIR__ . '/uitgepakt');
    $zip->close();
    echo 'Uitgepakt';
} else {
    echo 'Het zip-bestand kon niet worden geopend';
}

Not working? Then check in Select PHP version whether the zip extension is enabled. Delete the test script when you're done.

Just want to extract a zip file you uploaded yourself? You can also do that without code in File Manager, see I want to upload and extract a zip file.

Detailed explanation with screenshots: Enabling and disabling PHP extensions in the DirectAdmin manual.

Was this article helpful?

← Back to General hosting

One moment…

Set up your domains

For each domain, arrange the nameservers, the link to your hosting and who becomes the owner.

Loading your domains…