Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/magento/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Magento AddImageToDiagallery移动图像而不考虑参数_Magento - Fatal编程技术网

Magento AddImageToDiagallery移动图像而不考虑参数

Magento AddImageToDiagallery移动图像而不考虑参数,magento,Magento,功能定义: void addImageToMediaGallery (string $file, [string|array $mediaAttribute = null], [boolean $move = false], [boolean $exclude = true]) 我这样称呼它: $product->addImageToMediaGallery($fileName, '', false, false); 即使$move arg设置为false,magento仍将我的图像文

功能定义:

void addImageToMediaGallery (string $file, [string|array $mediaAttribute = null], [boolean $move = false], [boolean $exclude = true])
我这样称呼它:

$product->addImageToMediaGallery($fileName, '', false, false);
即使$move arg设置为false,magento仍将我的图像文件移动到“media/catalog/product/f/i/filename.jpg”,而不是使用图像的原始文件位置“media/catalog/product/12/1234/o.1234.jpg”

在我的代码中,$fileName设置为“media/catalog/product/12/1234/o.1234.jpg”

我是不是遗漏了什么