'Request[files][0]' => curl_file_create(__DIR__ ."/upload/iblock/158/158e2eabb60b3830ae08c97bb288a258.jpg",'image/jpeg','test1'),
'Request[files][0]' => curl_file_create($_SERVER["DOCUMENT_ROOT"] ."/upload/iblock/158/158e2eabb60b3830ae08c97bb288a258.jpg",'image/jpeg','test1'),
$document_root = $_SERVER["DOCUMENT_ROOT"];
if (($file = fopen("$document_root/bitrix/catalog_export/test.csv" , "r")) !== false) {
while (($data = fgetcsv($file, '100', ';')) !== false) {
if ($data[1] > 0) {
$data[1] = 1;
}
$csv_new[] = $data;
}
fclose($file);
}
var_dump($csv_new);
$file_new = fopen("test2.csv" , "w");
foreach ($csv_new as $line){
fputcsv($file_new, $line, ';');
}
fclose($file_new);