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

Return X values where an ID number doesnt matter
Well as for subject heading, thats the best i could think of.

Currently im having a problem w

Procedural to OOP
John Kleijn said that to avoid writing "crappy code", we should learn OOP and common OO pr

Simple AND question
Hello,

I've got following code:

Code: if(strpos($row[13],"http://")

Add_Months not Easy to Understand
Oracle is number 1, very fast and very easy. But....
OK, I think but have a problem, only 1 pro

Display data returned from Ajaxservices!!
I have a question about displaying results using ajax. I have part of the code below.
$.ajax({

Class not found error
I am getting Class 'index' not found in Eval function:

//write config

$pat

How to clone an SAP ECC using bacup tape on z/os?
We want to clone our production to a different SID using backup tape.

convert PHP array to Javascript array
I have a page that gets a request sent from AJAX, and I am trying to convert a PHP array to a javasc

Help with some dates
I have a list of dates in an array:

$mondays = array(
strtotime("October 12, 2009

Are sessions secure at all?..
I haven't really gotten into yet, but I was just thinking of something weird..

Lets say you h

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