Image upload - determine folder


Posted on 16th Feb 2014 07:03 pm by admin

I have an upload script that may be accessed from different directories. Problem is, the script is made with "../images/uploads" as the folder place for uploaded images. Which means that if the script is accessed from the main home folder of the site, it won't work. I'd like a more dynamic solution. I seen somebody give an example of this a while back. I know that I'll have to use one of the $_SERVER variables. Just not sure which one exactly and how to go about doing it.
No comments posted yet

Your Answer:

Login to answer
319 Like 36 Dislike
Previous forums Next forums
Other forums

Custom Container in module pool program
Hello everyone,

I have created a custom control in my module pool screen. Now I want to s

Day of week
I am using PHP version 5.0.5
I have a varaible ($DATE (date format yyyy-mm-dd)) that is being inc

help with variable
I've got a problem, i want to echo some images depending on the $id, however for me to get that id i

Relative path
I have a absolute path to an image - like so: C:/Program Files/Apache Software Foundation/Apache2.2/

Using system() and bringing back the results
I am aware that you can use system() within PHP to execute system commands, but I was wondering if t

Phase Error I can't seem to find :(`
Hey guys, I can seem to find my phase error on this. I am getting this error

[error]
Pars

Problem writing URL into database
How would I write this into the database?

<?php echo "http://".$_SERVER['SER

chat
hello i'm amir i need a chat source code in asp.net 2.0 without Ajax. anybody can help me?

PayPal Redirect Issue
When I have my paypal button set so that is redirects to http://empiremarketing.ca/order.php,it work

Limiting uploaded file type
Hi. First post here
I am working on a simple upload script, and I need it to limit the allowed f

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash