• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
File Uploading Class

#11
[eluser]peter_k[/eluser]
OK, so I have re-installed CI - latest version.

I'm still having the exact same problem.

$_FILES['userfile'] just never gets set.

I've checked the php setup and all upload related values are correct and max file sizes are large enough. So it doesn't seem like a php issue.

I'm at a complete loss ...

#12
[eluser]peter_k[/eluser]
Kinda Resolved - but I don't understand why ....

I uploaded a fresh copy of CI and the uploader worked just fine. So one-by-one I added my files. After much trial and error, I discovered that uploading my own config.php file caused the uploader to stop working. In my config file I had changed just one setting - the base_url. I'm sure I had it set correctly as all site files loaded as expected. However, when I set this to blank as was in the fresh copy of config.php, everything works perfectly.

I then tested a bit further to see was this causing the problem I mentioned earlier, that (in my previous installation) using the form helper to construct a form caused no data to be posted. And that turned out to be the case.

Conclusion - for my installation

With $config['base_url'] set to anything except blank,

1. $_FILES never gets any value from a form

2. a form created using the form_open helper function will not post anything to the $_POST array

I can't explain this at all, but am very happy to have discovered the cause of the strange CI behaviour.

#13
[eluser]InsiteFX[/eluser]
It's simple when you leave the base_url in config blank '' CI will try to figure out the url.

Which means it did not like what ever you put in the base_url or you forgot to include the ending /


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.