很简单的一个小例子 jQuery Mobile + PHP 通过超全局 $_FILES 上传,然后用move_uploaded_file()方法把上传的图片移动到到本地服务器下的文件夹,
下面是html和php的代码
<br /><br /><br /><br /> <meta charset = "utf-8"><br /> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css"><br /> <script src="http://code.jquery.com/jquery-1.8.3.min.js"></script><br /> <script src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js"></script><br /><br /><body><br /> <div id="upload"><br /> <div><br /> <h1>校园祭</h1><br /> 首页<br />
<input id="uploadimg" name="file" type="file" runat="server" method="post"
enctype=”multipart/form-data” data-inline=”true” data-ajax=”false” />
创新实验
*本文来源gaodai#ma#com搞@代~码^网+搞代gaodaima码