Jump to content

$_File and require(), mindnumbing.


Haemp

Recommended Posts

Hi guys.

I have a site which displays different sections by requiering the correct .php according to $_GET, in the middle of the index.php. Now I have a upload function which use to work (before the require design) like this: upload.php (has form) action ----> uploader.php (has the uploading file code and a message). That worked like a charm.

 

Now With the newer design I have the exact same code but with some re-arangements: upload.php(has form and regulated with an IF statement, has the uploading file code). Remember this is all being loaded from index.php ie. upload.php is recuired in index.php?view=upload. Here comes the mystery (for me): My $_FILES array comes up empty. I get the POST array but the FILES one is gone. Any ideas?

Link to comment
https://forums.phpfreaks.com/topic/104774-_file-and-require-mindnumbing/
Share on other sites

*Update*

So I re-wrote the script and now my FILES array is there and looking good. So the real problem with the previous script was premission. I got the Permission denied unlink.function. But I get it only when the files are displayed through the require script. Hope this helps...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.