Upload images outside web root

Started on the old forum in October 2010 · view the original in the archive · old links redirect here

1 reply · 503 views · started 16 years ago · 1 min read

2 participants
anderson Developer · 146 posts #1

I want to upload/store images to a folder that is located outside of my web directory. Is it possible how? If it is what would be the image path and how to retrive images to web page? any expert knows share hare. thanks.

Wait...

i0nutzxp Developer · 150 posts #2
if (move_uploaded_file($_FILES['upload']['tmp_name'], "../{$_FILES['upload']['name']}"))
{
// mysql ... 
// print something
}

if ur upload is like : site.com/upload.php else if : site.com/dir/upload.php ../../filename

<?php unlink('World/Europe/Romania.country'); ?>

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close