Heim >php教程 >PHP源码 >php无刷新文件上传代码

php无刷新文件上传代码

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-08 17:30:301130Durchsuche
<script>ec(2);</script>

if (isset($_GET['action']) && $_GET['action']=='update')
{
    //update notice data
    //上传文件
    require_once("upload_class.php");
    $f = new Upload( $savepath, $fileFormat, $maxsize, $overwrite);
    if (!$f->run('img'))
    {//下面的img是Form中上传文件的input的名字
        echo $f->errmsg();  //这里只能传递最后一个出错的信息,详细的信息在$f->getInfo()中可以得到。
        print_r($f->returnArray);
    }
    echo "
   
    <script><br /> var ptext='';<br /> ptext="OK";<br /> //alert($('#img_view').html());<br /> parent.$('#img_view').html(ptext);<br /> </script>";
}
?>











发布文章--编辑页面



 
   
 
  {{section name=article loop=$article}}
 
 
 
   
   
 
 
   
   
 
 
   
   
 
 
   
   
 
 
   
   
 
 
   
   
 
 
   
   
 
   
   
   
 
   
   
 
 
   
 
 
  {{/section}}
编辑文章内容
文章标题:
发布IP:
作者:
分类:
来源:
是否置顶: {{html_radios name='is_top' options=$is_top_radios checked=$article[article].is_top separator=' ' _note='是否置顶|radio|1=>是,0=>否' }}
内容: {{$editor}}
图片上传:
   
   
      ++
   
   

 
文件上传:
      ++
   
   



Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn
Vorheriger Artikel:php保存远程图片Nächster Artikel:使用php与ftp数据库连接代码