![]() |
File not uploading live hosting. help? :) - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: File not uploading live hosting. help? :) (/showthread.php?tid=88624) |
File not uploading live hosting. help? :) - xsPurX - 10-07-2023 I had this working fine on localhost, but since I put the folder structure outside public_html, I had to change the path to the upload directory. So I made a writable/uploads folder in public_html. The problem is it doesn't seem to upload, and my database just gives fillled with only part of the file path, with no filename. Sorry for all the posts, I'm used to CI2. and been away for awhile. so I skipped CI3. and a lot has changed! PHP Code: rules = [ Edit.... now it is somehow uploading the files to the directory above public-html. I don't understand why its uploading there, cause I have the correct path listed above. Somehow ci is saving the files in an unaccessable folder.. Any ideas? I had to do this below. it works. ![]() PHP Code: filepath = $img->store('../../../public_html/writable/uploads/'); RE: File not uploading live hosting. help? :) - JustJohnQ - 10-07-2023 Use base_url(): https://codeigniter.com/user_guide/helpers/url_helper.html?highlight=base_url#base_url RE: File not uploading live hosting. help? :) - sammyskills - 10-07-2023 Why don't you use the move() method? See docs. |