1
我有一些字段的表格:jQuery的提交表单(文件输入)的唯一分部
<form action="xyz.php" method="post" enctype="multipart/form-data">
<input type="text" placeholder="First name" name="firstname">
...
<input type="file" name="logo">
...
<input type="submit" name="submit">
</form>
图像应立即上传到img_upload.php
。在这个文件中,我需要$_FILES
阵列。 我的img_upload.php
脚本上传图像,对图像做一些操作(调整大小,...)并将图像的URL提供给我。在此之后,图像应显示在窗体中。
有没有机会上传图像(发送$_FILES
数组到另一个文件)而不提交整个表单?
您无法使用Ajax上传文件。使用像http://www.uploadify.com/ –