Welcome Guest, Not a member yet? Register   Sign In
RESOLVED: CI, $_FILES, and _AMPs
#1

[eluser]wolfman2000[/eluser]
I am using XAMPP for my local machine development on my website redesign. I just recently implement a file uploading feature for the purposes of reading a file's contents, and I ran into a situation.
Code:
$fileName = $_FILES['userfile']['name'];
$tmpName  = $_FILES['userfile']['tmp_name'];
$fileSize = $_FILES['userfile']['size'];
$fileType = $_FILES['userfile']['type'];
When I tried reading $_FILES['userfile'] on my local machine, I was only able to get $fileName stored with a proper value. $tmpName, $fileSize, and $fileType were either 0 or blank/FALSE.

When copied my setup to the live server (using a separate folder of course), all four of those variables were defined with proper values, and I was able to open the file by the $tmpName.

This might not be the most CI related question, but is there a way for me to configure XAMPP to use some sort of temporary folder location for file uploads? I don't want to be forced to develop on the live server.

-----------------------

Alright, a solution has been discovered.

Go to /Applications/xampp/xamppfiles/etc and edit php.ini to include upload_temp_dir. Now I can test more parts of my page without issue.

Sorry about all that.




Theme © iAndrew 2016 - Forum software by © MyBB