Image upload failure


#21

just one last question :
how to get absolute path of any file ?
like i have files inside “public_html/public/…” but in local server it is like "xammp/htdocs/public_html/public/…"
so what is the path for web host ? anything like that ?
I really meant is that what is the site_root for webHost


#22

I think you could use realpath() for that… For further documentation check out php.net :wink:


#23

No Not that
is it correct : "/storage/ssd5/716/1907716/"
for my storage


#24

I really meant is that what is the site_root for webHost

The site root can be viewed by going to 000webhost cPanel > locate your website > Details > Home directory

But note that you’ll need to add /public_html right after Home Directory. /public_html is the folder which is accessible to the browser.


#25

@NGiNX and @akhilkumar332 Thanks for helping me
error has been rectified .
problem was with target path

[code]
$target_path = ‘/storage/ssd5/716/1907716/public_html/public/images/’.$this->filename;
[\code]
U can closed the case.


#26

We are glad you solved it out! :blush:


closed #27