PHP Подправить код архивирования в zip
2 USDЕсть такой код архивирования файла. Нужно 1. сделать так чтобы пути в архиве были относительные, а не абсолютные. 2. Научиться считывать файл из архива без извлечения на HDD, сразу в память. Фактически этот скрипт будет использован для того, чтобы экономить место на HDD сервера и хранить текстовые файлы в сжатом виде, экономия в 10 раз! Возможно есть и другой подход
$error = ""; //error holder
{
$file_folder = "/home/admin/web/site.ru/public_html/filename.txt"; // folder to load files
if(extension_loaded('zip'))
{
// Checking ZIP extension is available
//if(isset($post['files']) and count($post['files']) > 0)
{
// Checking files are selected
$zip = new ZipArchive(); // Load zip library
$zip_name = time().".zip"; // Zip name
if($zip->open($zip_name, ZIPARCHIVE::CREATE)!==TRUE)
{
// Opening zip file to load files
$error .= "* Sorry ZIP creation failed at this time";
}
//foreach($post['files'] as $file)
{
$zip->addFile($file_folder); // Adding files into zip
}
copy($file_folder,time().".txt");
$zip->close();
ECHO 'GOOD';
/*
if(file_exists($zip_name))
{
// push to download the zip
header('Content-type: application/zip');
header('Content-Disposition: attachment; filename="'.$zip_name.'"');
readfile($zip_name);
// remove zip file is exists in temp path
unlink($zip_name);
}*/
}
//else
//$error .= "* Please select file to zip ";
}
else
$error .= "* You dont have ZIP extension";
}
Current freelance projects in the category PHP
Integration of Blade article template | Laravel | Frontend
100 USD
Integration of Blade template for article | Laravel | Frontend Task Essence The site is built on Laravel. A ready HTML/CSS layout for a premium blog article page. It needs to be integrated into the existing Blade structure of the site. The design is ready. You are not designing… PHP, Web Programming ∙ 13 hours 18 minutes back ∙ 54 proposals |
Implementation of a technical SEO audit on OpenCartGood day. Need to implement technical SEO fixes on the site softugo.com. The site is already developed but not fully launched yet. Platform: ocStore 3.0.2.0 / OpenCart + custom code. Hosting: Hostinger. Current PHP version: 7.3. (transition to PHP 8.2 is planned) A checklist… PHP, Web Programming ∙ 15 hours 20 minutes back ∙ 50 proposals |
Execution of work after SEO audit
334 USD
An experienced OpenCart developer is needed to perform SEO and technical improvements for the online store. Main tasks: Correction of the internal linking structure and menu. Adding links to the footer. Implementation of breadcrumbs with Schema.org microdata. Fixing the… PHP, Website Maintenance ∙ 3 days 15 hours back ∙ 63 proposals |
Integration needed: KeyCRM → Cash Register KashalotIt is necessary to set up integration between KeyCRM and the Cash Register Kahalot. When placing an order in KeyCRM, the data must be automatically transmitted to Kahalot: • order information • products, nomenclature • prices • quantity More details in private. Content Management Systems, PHP ∙ 6 days 11 hours back ∙ 29 proposals |
A WordPress site using the Kadence theme and Kadence Blocks.
223 USD
We need to create a website on WordPress using the Kadence theme and Kadence Blocks. There will be no online store (although it may be added in the future). We need a homepage and several internal pages. The graphics are already prepared, the layout structure is mostly defined,… Content Management Systems, PHP ∙ 7 days 21 hours back ∙ 38 proposals |