我目前正在开发 Joomla!网站。我正在使用 Jumi 扩展(它允许在 Joomla! 本身中制作和执行自定义脚本)来创建一个简单的文件上传工具。问题是我收到以下错误:
警告:复制(C:/xampp/htdocs/images/1253889508.jpg)[function.copy]:无法打开流:C:\xampp\htdocs\Joomla\components\com_jumi\jumi.php中没有这样的文件或目录(25) : eval()'d 代码在第61行
违规代码如下:
//we will give an unique name, for example the time in unix time format
$image_name=time().'.'.$extension;
//the new name will be containing the full path where will be stored (images folder)
$newname='C:/xampp/htdocs/images/'.$image_name;
//we verify if the image has been uploaded, and print error instead
$copied = copy($_FILES['image']['tmp_name'], $newname);
完整代码可在此处获得。一旦我得到这个工作,我将对其进行修改以满足我的网站的需求。
我不确定问题是 Jumi 的权限问题还是还有其他问题。我能说的最好的是,无论出于何种原因,临时文件都没有被创建。
感谢您提供的任何提示!