php上传txt时候,能不能把ansi转换成unicode,啊。因为我要把数据显示在flash里。flash只支持unicode,不要用$uploadfile = iconv('gbk','utf-8//ignore', $uploadfile);这样无效 还是显示乱码
   “ ½ð±̻Ի͵ŬµîÀ¼¸¸ùÇæÌìÓñÖù¸ßËÊÈëÔƣ¬¹¬µîÍ⵽´¦ÊÇһƬÔÆÎíçÔÈƣ¬±̳ØÀïֲÂúÁËÓñÁ«£¬ʱ²»ʱ»¹¿ÉÒԿ´¼û¼¸ֻÏɺ׷ɹý±¼ÉÏÌìµľ¡ͷ£¬ÕâÀﲻÊDZ

解决方案 »

  1.   

    可你这个 $uploadfile 显然是上传的文件名,而不是文件的内容
      

  2.   

    $uploaddir = './mybook/';//设置存储路径
    $filename = $_FILES['fileField']['name'];//获得选择的文件'
    $bigsmall=$_FILES['fileField']['size'];
    $fileinfo=$_FILES['fileField'];
    $hehe=date("Y-m-d").rand().$type;
    $uploadfile = $uploaddir .$hehe;
    $content=file_get_contents($_FILES['fileField']['tmp_name']);
    $content= iconv('gbk','utf-8//ignore', $content);//设置文件格式
    move_uploaded_file($content,$uploadfile);//开始上传
    为什么传不上去??? 郁闷啊