Results 1 to 2 of 2

Thread: help meee :(

  1. #1
    Join Date
    Oct 2003
    Posts
    1

    Unhappy Unanswered: help meee :(

    $fname= $_FILES["file1"]["name"];
    $tmp= addslashes($_FILES["file1"]["tmp"]);
    $size=$_FILES["file1"]["size"];
    $type=$_FILES["file1"]["type"];
    $fd=fopen($tmp,"r") or die("Can't open file 1!");
    $fdata=urlencode(fread($fd,filesize($tmp)));


    /usr/local/psa/home/vhosts/proyltd.com/httpdocs/download/tmp
    chmod 777

    screen out:
    Can't open file 1

  2. #2
    Join Date
    Oct 2003
    Posts
    706

    Unhappy

    By what possible means COULD someone help? This snippet of code has nothing useful to act on.
    ...
    I'll gamble that the cause of the problem is that the filename being passed to the "fopen" is incorrectly formed. The error will probably be easy-as-pie to diagnose ("awww... 'doh!'") AS SOON AS you can SEE it. So, make the error-message show you!
    ...
    The error-message would have been infinitely more useful if you had written:
    Code:
    ... or die("Can't open file: '$tmp'")
    ChimneySweep(R): fast, automatic
    table repair at a click of the
    mouse! http://www.sundialservices.com

Posting Permissions

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