Jump to content

Non-passing of variable


sharpmac

Recommended Posts

Greetings, I have a flash upload script that I have been customizing for a few days, I almost have everything compleated and working great but I am having a heck of a time with

 

line 59

http://pastie.org/511878

 

Regardless of what I do I can not get it to upload the files into the variable name, if I hardcode the variable $directory = "files/" it works just fine, but if you have read the remainder of the script you will see that I am creating gallery data with XML and php. I have the code make a new directory based off the event name, then make a xml file with the image name and descriptions, and all I want it to do is upload the images into the newly created directory that is known as $dir

 

 

and its killing me

Link to comment
https://forums.phpfreaks.com/topic/162182-non-passing-of-variable/
Share on other sites

Thanks for the reply, but still no luck.

 

The combinations I have done with no success are as follows.

 

$directory = $dir/;

$directory = '$dir/';

$directory = "$dir/";

 

All with no luck

 

the trippy part is it does echo just fine, the variable is there, but for some reason it does not register as properly when called through the uploader.

 

The only other time $directory is called into use is as follows.

 

if ($allowed) {	
	if ($maxFileSize == 0 || $maxFileSize >=  $_FILES['Filedata']['size']) {	
		move_uploaded_file($_FILES['Filedata']['tmp_name'], $directory.basename($_FILES['Filedata']['name']));
		echo " ";		
	}

}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.