我有一个内联编辑的Kendo UI网格。我的字段/列之一是使用kendo upload。通过kendo上传,我使用了saveUrl
到upload.php
文件中。
{ field: "propertyLogo", title:"Logo", editor: fileUploadEditor },
function fileUploadEditor(container, options) {
$('<input type="file" id="fileUpload" name="fileUpload" /> ')
.appendTo(container)
.kendoUpload({
multiple:false,
async: {
saveUrl: "upload.php",
autoUpload: true,
},
validation: {
allowedExtensions: [".jpg", ".png", ".jpeg"]
},
success: onSuccess,
upload: onUpload,
progress: onProgress
});
}
在我的upload.php
中,我尝试echo
$file
来检查结果,但是什么也没显示。我想知道我做对了吗?使用kendo上传的kendo网格有示例/演示吗?
if($_SERVER['REQUEST_METHOD']=='POST') {
$file = $_FILES['fileUpload'];
echo $file;
}else{
echo "Access Denied!";
}