9

Server root code codeigniter

 3 years ago
source link: https://www.codesd.com/item/server-root-code-codeigniter.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Server root code codeigniter

advertisements

I am trying to upload video in server using Codeigniter, In the localhost i can do it, but when in the server it does not work. Even though do_upload() function returns true.

When i'm testing the server root, print_r($_SERVER['DOCUMENT_ROOT']); it returns

/var/www/mjpp/data/www/supps.mydomainname.com

Also the $updata = $this->upload->data(); returns

[file_path] => /var/www/mjpp/data/www/supps.mydomainname.com/public/video

Can you tell me why /var/www/mjpp/data/ is appearing before my main domain name , and is it the cause of any error for uploading video?

Thank you in advance, sorry for my bad english.


/var/www/mjpp/data/www/supps.mydomainname.com is absolute location of your document root in a system in general. However you do not usually have access to anything above your user dir.

public/video or /var/www/mjpp/data/www/supps.mydomainname.com/public/video (as absolute path) is what you pass to Upload library as upload_path. This is where the library will try yo upload the files. This folder should exist and be writeable (have 0777 permissions on it for example).


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK