dongping4901 2015-02-17 22:27
浏览 41

如何使用url显示文件夹中的图像

i am using php code for creating folder at run time where i am storing some images.

when i try to accecss these image it does not show images asa well as folder name using appropriate URL.

but when i logedin using cpanel it shows folder name.

Here is my code

  $dir="1buyerseller";
         $desired_dir=$email;
        $filename=  $dir.'/'.$email.'/'.$file_name;
        //echo $filename;
        $query="INSERT into  buysellsetailads (id,ads,cid) VALUES('seller','$filename','$cid'); ";
        if(empty($errors)==true){
            if(is_dir($dir.'/'.$desired_dir)==false){
                mkdir("$dir/$desired_dir", 0700);       // Create directory if it does not exist
            }
            if(is_dir("$dir/$desired_dir/".$file_name)==false){
               move_uploaded_file($file_tmp,"$dir/$desired_dir/".$file_name);
            }else{                                  // rename the file if another one exist
                $new_dir="$dir/$desired_dir/".$file_name.time();
                 rename($file_tmp,$new_dir) ;               
            }
         mysql_query($query);           
        }

Using this code i am creating folder and uploding image into this folder. whnen i try like this

http://www.xpokerala.com/admin/1square/

Here some folder are showing which created hardcoded but dyanamic created not showing

Why i dondt no.

How can i resolve this issue

Thanks

  • 写回答

1条回答 默认 最新

  • dongxuxian6930 2015-02-17 22:32
    关注

    $query="INSERT into buysellsetailads (id,ads,cid) VALUES('seller','$filename','$cid'); ";

    should this be buysellretailads?

    评论

报告相同问题?

悬赏问题

  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 关于大棚监测的pcb板设计
  • ¥15 stm32开发clion时遇到的编译问题
  • ¥15 lna设计 源简并电感型共源放大器
  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)