![]() |
Upload file in shared hosting - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=31) +--- Thread: Upload file in shared hosting (/showthread.php?tid=88024) |
Upload file in shared hosting - afhamz - 07-08-2023 Hi, i've some problems with CI 4 when uploading a file in shared hosting this is my part of controller: $docNew->move(WRITEPATH . '../public/'.$directory, $docName); its work on localhost on my pc (i'm using laragon and php 7) that the file is uploaded to public directory but when the project is uploaded to hosting, the code above work but the file uploaded not in public directory, it uploaded in core of app folder so the folder tree of my project be like this: coreapp - public_html - - directory - - - *here the file uploaded public_html please someone can help me? thanks in advanceĀ ![]() RE: Upload file in shared hosting - kenjis - 07-08-2023 Try: PHP Code: $docNew->move(FCPATH . $directory, $docName); |