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

How do I get the row number from from an sql table query
Hi all

I have a table that I query and it returns a number of rows.
mysql_num_rows($query)

Renaming array keys
The issue: renaming array keys inside a foreach loop.

I'm trying to build a pie chart image w

LinkedList help
Ok so I just learned quickly about lists, so I have a not too hard project I think, but am having a

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result
what is wrong with this

Code: [Select]<?php
if ($_SERVER['HTTP_REFERER'])
{

split string
Hi all

i have some names (imploded by comma):
Code: toronto,paris,madrid
Now, i would

defining website tags
Hi,

What would be the best way to define tags for my site, such as website title, url etc.

how to load a Sys file with system load and call images?
normally you need register the module as a service with CreateService, and start the service

Change image filetype on upload?
Hi,
I've got a form which uploads an image to the server.
Is it possible to change the image t

division gives infinity anser
int main()
{
int z=0;
int i=1/z;
cout<
}

It doesn't throw a

Java API in PHP?
I have an application that we use internally here at the office.

The software company provide

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