Ne-Lexa / php-zip

PhpZip is a php-library for extended work with ZIP-archives.
MIT License
491 stars 60 forks source link

Uncaught Error: Class "PhpZip\Model\ZipContainer" not found #89

Closed toolost9 closed 2 years ago

toolost9 commented 2 years ago
Q A
PHP version(s): 8.1.2
OS (with bit depth): Windows 10

Hello guys, i'm new in PHP so it's a stupid question. When i try to create a zip i receive this error:

Uncaught Error: Class "PhpZip\Model\ZipContainer" not found in C:\xampp\htdocs\Nuova cartella\PhpZip\ZipFile.php:88 Stack trace: #0 C:\xampp\htdocs\Nuova cartella\PhpZip\ZipFile.php(70): PhpZip\ZipFile->createZipContainer() #1 C:\xampp\htdocs\Nuova cartella\contact-form.php(6): PhpZip\ZipFile->__construct() #2 {main} thrown in C:\xampp\htdocs\Nuova cartella\PhpZip\ZipFile.php on line 88

In my php file i included "include 'PhpZip/ZIpFile.php';" and in the dir Php>ip\Model\ZipContainer i have the file ZipContainer.php

I'm trying to creare the zip with $zipFile = new \PhpZip\ZipFile();

Thx!

Ne-Lexa commented 2 years ago

@toolost9, use a composer or psr-4 compatible autoloader.