fopen() - File Not Found

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • GeorgeLost
    New Member
    • Apr 2007
    • 2

    fopen() - File Not Found

    I have been learnig php over the past few months so I'm still new at this. I want to import an Excel csv file into mysql database using php. After trying countless online scripts, I've discovered that my file is not being found by fopen().

    $newfile = @fopen("$FileNa me", "r") or exit(" Could not open file: ");

    $FileName is set 2 lines earlier to the csv file which is located in the same subdirectory as the php script.

    How can it not find the file?

    HELP!!!
  • code green
    Recognized Expert Top Contributor
    • Mar 2007
    • 1726

    #2
    [PHP]$newfile = @fopen("$FileNa me", "r") or exit(" Could not open file: ");[/PHP]
    Get rid of the pointless '@' symbol and it might tell you

    Comment

    Working...