I am using codeigniter 2.1.2 upload class to upload a file to a remote server on hostgator. I got a following error when trying to upload a file.
The upload path does not appear to be valid.
Here is my folder structure:
my-addon-domain/
—-import(target folder)
—-application/
——–controller/
————upload_controller.php
in my controller, I have tried set different path to $config[‘upload_path’] including
- /home/my-hostgator-username/public_html/my-addon-domain-folder/import/’
- ../import/
- my-site-url/import/
None of these work. I am sure to set writeable permission to folder “import”.
Many thanks
Try using
realpath(would suggest your import folder is one level beneath the web server root folder (where index.php resides)
or