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

Choose Image - Slashes are incorrect in path

Thread began 6/22/2011 4:28 pm by codamedia | Last modified 11/25/2011 4:49 pm by codamedia | 3312 views | 21 replies

neo314

Sorry, I have probably led you astray. I have been looking at this thread on my phone while traveling and sleepy, and think I missed the mark on your issue.

First, I said it correctly in the first post but typed it wrong and my correction was also incorrect.

To remove document_root from __FILE__, the string replace function should be around __FILE__ not $kfm_userfiles_address.

rel2abs($kfm_userfiles_address,str_replace($_SERVER['DOCUMENT_ROOT'],"", dirname(__FILE__))). "/";

HOWEVER, I have a couple more things to consider. First, you may want to remove the document root from the result:

str_replace($_SERVER['DOCUMENT_ROOT'],"",rel2abs($kfm_userfiles_address,dirname(__FILE__))). "/";

Second, and most important of all, my file has the original code:

$kfm_userfiles_output =  rel2abs($kfm_userfiles_address,dirname(__FILE__));
and works fine. It sounds more like you have the wrong setting in WebAssist (WA) for the $kfm_userfiles_address. This thread did not recommend changing the line of code you started to change, so where did you get that fix from?

Did you see my earlier post:

  Well I figured out a few things. I was seeing a missing slash between the userfiles directory and the first sub-directory. The source file has a user files path of ../../files, and I still have a problem that the site definition for the site would not let me browse for a directory, so I entered it in the same fashion as the files listing, /assets (notice I had to insert a leading forward slash or end up with /assets/assets). The correct listing should be /assets/. That causes the slash to be included between assets and events in my example above. See Troubleshooting  

You might try changing how you entered the directory in the WA interface to /FileUploads/. If that does not work, try this:

Take this code (or similar code in your file) on lines 29-32:

$kfm_userfiles_address = '../../files/';
if (isset($_SESSION['useOverrideRoot'])) {
$kfm_userfiles_address = abs2rel($_SESSION['useOverrideRoot'],dirname(__FILE__));
}

Comment out the WA override and adjust the $kfm_userfiles_address to see what works:

$kfm_userfiles_address = '../../FileUploads/';
/*
if (isset($_SESSION['useOverrideRoot'])) {
$kfm_userfiles_address = abs2rel($_SESSION['useOverrideRoot'],dirname(__FILE__));
}
*/

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