I'm running the latest stable build of php for windows on my win2k pro machine. I'm trying to set up a file upload script that utilizes fopen().
Right now I've got this code giving me the following error (errorchecking is snipped for clarity):
============
// Define file properties
$TheFile = $_FILES['myfile']['tmp_name'];
// Attempt to open the file
$OpenFile = fopen($TheFile, "rb")
// Read the open file into a temporary variable
$OpenedFile = fread($OpenFile, $FileSize);
fclose($OpenFile);
//Open a new file in the correct directory using the name of the uploaded file
$FileToCreate = $mydestinationfolder . $mydestinationfilename;
$FileHandle = fopen($FileToCreate, "wb");
ERROR: Warning: fopen(ftp://...@127.0.0.1/wtk/images/companylogos/testfile.txt) [function.fopen]: failed to create stream: FTP server reports 125 Data connection already open; Transfer starting. in c:\applications\wtk\class\clsUploader.php on line 70
The wierd part is, it's creating the file in the folder, but it's just not returning that handle for some reason.
I've been crawling all over the internet today trying to figure out why this won't work for me. I've found a bunch of people who have had my problem and asked for help. None of them have ever gotten any responses.
Hopefully that won't be the case here :\
Thanks in advance...