View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

UploadFolder variable difficulties

Thread began 10/17/2009 11:13 am by martin389853 | Last modified 10/19/2009 7:10 am by martin389853 | 1076 views | 7 replies


I have now used the same variable, eg. $imageFolder, in the same page, once as an echo statement and once also to read all the files in that directory, eg.

$dir= "$imageFolder"; //<--define the directory to view.
$files = scandir($dir); //<--read all the images into an array.
$im_num = 0; //<--reset image number before count

foreach ($files as $image)
if(substr($image, 0, 1) != '.') //<--Ignore anything starting with a period.
$image_size = getimagesize("$dir/$image");
//<--Get the image's size in pixels.
$file_size = round( (filesize("$dir/$image")) /1024) . "kb";
//<--Calc size in kb.
$im_num = $im_num - 1;
//<--count every image in the folder.
$rev_im_num = $im_num*-1;

//<--Display the info.
echo "<tr>

So now I see the variable as a link so that I know how it looks. I also see if the link works because I get a list of the images in the file with file size. This means that the variable element is the correct file location. Knowing this and knowing that using the link (not the variable) directly in the WA_UploadResult script works, I must conclude that there is nothing wrong with the variable or the folder permissions.

I therefore conclude that WA_UploadResult is taking my variable and ... eating it. Bad boy WA_UploadResult. Only you guys know what your extension is doing and how it is doing it so only you can tell me why your script is turning my variable into air. thanks for listening.

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...