I am using Uploading Class to upload images. But the location where my uploaded images will be stored is: http://www.mysite.com/uploads/
Absolute path to this folder is: c:\wamp\www\mysite\uploads\
Application folder is in : c:\wamp\www\mysite\application\
So when I upload to server, absolute path will not be same. So, how to get absolute root path to use with the upload_path
config of Uploading Class?
This is coming late but the right path is:
FCPATH.'uploads';
If the uploads folder is in the root of your site then you can simply use ./uploads
in your upload path configuration.
$config['upload_path'] = "./uploads";
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With