Page 1 of 1

Uploading files

Posted: Fri Oct 05, 2012 6:16 pm
by musicscore
Im building my first module and I very proud that, althought I also must learn php. every thing is working except .....
I cannot figure out how the file upload is working.

I used the 'CreateFileUploadInput' api but then I have two problems.

In IE7, the variable, in mycase filename, is holding the complete path (ex. c:\manuals\example.pdf) and in other browsers it is holding only the filename (ex. example.pdf).

The second problem is that I want to use fopen php command to read the file from the source ($handle = fopen("$filename", "r"); and the write the file to the server ($handle = fopen("$filename", "a") but in the read command the variable $filename should be the source (ex. c:\manuals\example.pdf) and in the write command $filename should be the destination on the server.

How can I make this work in every browser ?

Please help.

(if my module is compleet, I will upload it to the module reposity. It will be a module to register domains)

Re: Uploading files

Posted: Mon Oct 08, 2012 11:01 am
by musicscore
Please, can anyone help me.