![]() |
global $mimes return NULL - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: global $mimes return NULL (/showthread.php?tid=39609) |
global $mimes return NULL - El Forum - 03-15-2011 [eluser]Julio Fagundes[/eluser] When I restrict mimes types, no files are uploaded (including jpg,gifs etc.) I got the alert 'The filetype you are attempting to upload is not allowed.'. in my controller. TROW ERROR Code: $config['upload_path'] = './upload'; UPLOAD, OK. but not solve my problem. Code: $config['upload_path'] = './upload'; with native function debug_print_backtrace() in config/mimes.php I got: #0 include() called at [C:\wamp\www\project\system\core\Output.php:46] #1 CI_Output->__construct() called at [C:\wamp\www\project\system\core\Common.php:166] #2 load_class(Output, core) called at [C:\wamp\www\project\system\core\CodeIgniter.php:177] #3 require_once(C:\wamp\www\project\system\core\CodeIgniter.php) called at [C:\wamp\www\project\index.php:198] So, we see that has it an include before the require_once Code: public function mimes_types($mime) LINE 950 but with require() Code: public function mimes_types($mime) - Where does global $mimes turns into null after the first include ? global $mimes return NULL - El Forum - 03-16-2011 [eluser]danmontgomery[/eluser] This sounds like https://bitbucket.org/ellislab/codeigniter-reactor/issue/121/uploading-doesnt-work-in-201? global $mimes return NULL - El Forum - 03-16-2011 [eluser]Julio Fagundes[/eluser] Thanks man. I had already extended the upload class, but the bug has been fixed that way too. cool ![]() |