close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

file upload rename problems

Thread began 3/13/2013 3:32 pm by Christopher West | Last modified 3/18/2013 11:25 am by Christopher West | 1273 views | 9 replies

Christopher WestCommunity Expert

Jason just a quick update..first thanks for the help the other night greatly appriciated...after you helped me I investigated why the original code I had worked on a previous website and not this current one....what I found was it was the function preg_replace that was making the code in the previous website working...hence why the following code was working inside the actual file upload behaviour using the fieldname of the file rather then [FileName]

<?php echo strtolower(str_replace(" ", "-", (((isset($_FILES["fileField"])))? preg_replace('/.[^.]*$/', '', $_FILES["fileField"]["name"]) :""))); ?>

Because the above code uses preg_replace what it was doing was manipulating the file extension (correcting it in my database) In other words it as a silly method I was using as the above code was basically ruining the filename but then correcting it by using the preg_replace....thats why when you helped me you had changed your code to not use preg_replace since it was removing the file extension :)

Chris

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

Content

rating

Layout

rating

Ease of use

rating

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...