1
Hi,
I am not sure is it the right group to ask the question. If you think it is better to ask in another group , i can repost it.
I got the file uploader module(1.1) from that page.
https://xoops.org/modules/news/article.php?storyid=1364However, I found that it doesn't work in my system. By the result of reading the code , I know the reasons:
- It need register_global to turn on. (Hmm... but i think it is recommended to turn off..)
- the line of move_uploaded_file() in index.php is wrong.
The original line:
: if (!move_uploaded_file($userfile, "$destination/$userfile_name")
My modification:
: if (!move_uploaded_file($userfile['tmp_name'], "$destination/$userfile_name"))
I am quite confused with that module.. I want to patch it to work in my system(the system admin may not be agree to turn on register_global)
For the first problem , should it be rewrite to work in register_global off?
The last one... It is quite strange. According to the description of move_uploaded_file , the first argument should be the "name of the file". It don't accept an array.
But why the module work fine in somebody's system..