I'm not sure of how you are set up, but the code that I've been giving you is for working with a database and file on the same machine. Are you trying to upload from your home machine to a remote server, i.e, your website? If so it can be easily accomplished using an interface like PHPMyAdmin. Another possibility is to upload the file by ftp, then use the code we've been working on to import the data, specifying the path to where the file resides.
If the database and file are on the same machine then yes, you do need to specify the path. Unfortunately, I'm not that familiar with working with files on a local machine. I can't imagine that it would be all that different than a remote machine. I imagine the code would be something like this:
$sql = "LOAD DATA INFILE 'C:/Program Files/MySQL/MySQL Server 4.1/bin/file.txt' INTO TABLE `table_name` FIELDS TERMINATED BY '|' ESCAPED BY '\\' LINES TERMINATED BY '\r\n'"
Give it a try, hopefully it will work for you. Trial and error is a great teacher, keep working on it.