Welcome Guest, Not a member yet? Register   Sign In
Upload file in shared hosting
#1

(This post was last modified: 07-08-2023, 06:38 AM by afhamz.)

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Ā  Smile
Reply
#2

Try:
PHP Code:
$docNew->move(FCPATH $directory$docName); 
Reply




Theme © iAndrew 2016 - Forum software by © MyBB