Home  >  Article  >  Backend Development  >  javascript - webuploader上传文件组件上传图片时如何带参数给php?

javascript - webuploader上传文件组件上传图片时如何带参数给php?

WBOY
WBOYOriginal
2016-06-06 20:19:061900browse

YII中使用webuploader上传图片。因为没有csrfToken,YII报了bad request的错误。
如何才能在webuploader中向服务器提交csrfToken (csrfToken可以获取到)?

报错信息
javascript - webuploader上传文件组件上传图片时如何带参数给php?

回复内容:

YII中使用webuploader上传图片。因为没有csrfToken,YII报了bad request的错误。
如何才能在webuploader中向服务器提交csrfToken (csrfToken可以获取到)?

报错信息
javascript - webuploader上传文件组件上传图片时如何带参数给php?

formData:{

<code>            _token:'{{csrf_token()}}'</code>

}

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn