SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Aug 2004
    Location
    UAE
    Posts
    36
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Uploading script problem ....... !!!!??????

    hi there

    i am planning to open a website for uploads and i did script for that but i faced a little problem ... i can't hide the path of the images directory so they can know which directory contain the files...


    see this code

    PHP Code:
    $pic_source addslashes($pic_source);
    $pic_source addcslashes($pic_source"\0");



    $pic_type $HTTP_POST_FILES["pic_source"]["type"];
    $pic_name $HTTP_POST_FILES["pic_source"]["name"];


    $prefix time();

    $newfilename $prefix "_" $pic_name;

    @
    copy($pic_source"$path/$newfilename"); 

    $tow date("U"). rand(0,5000);
    $imageurl ="http://{$HTTP_HOST}{$REQUEST_URI}?aa=$tow";
    print 
    str_replace("imageurl",$imageurlimplode (''file ("url.html")));

    mysql_query("insert into web_imgs(id,pic_name,pic_type,pic_source,uploaded)
    VALUES (\"\",\"
    $newfilename\",\"$pic_type\",\"$pic_source\",now())");





    $id mysql_insert_id($cons);


    echo 
    "<br>";
    echo 
    "<p align='center'><font face='MS Sans Serif' size='1'>Show<br>
    <span lang='en-us'><a target=blank href='show1.php?m6m=
    $id'>
    $site/show1.php?m6m=$id</a></span></font></p>
    <center><font face='MS Sans Serif' size='1'>Show
    <a href=show1.php?m6m=
    $id target=blank> 
    </a></font></center>"
    ;
    echo
    '</fieldset>';




    }}  }  } 
    then i got this

    http://localhost/upp/index1.php?aa=11012302871865

    but no image display


    can you help me please

  2. #2
    SitePoint Enthusiast
    Join Date
    Aug 2004
    Location
    UAE
    Posts
    36
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    up guys please help


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •