Highlighted

Does CF understand "/" ?

New Here ,
Sep 18, 2018

Copy link to clipboard

Copied

I have recently installed CF on Mac OSX. I tried to work on projects previously developed on Windows; in these projects paths are defined like this:

<cfset path = '/folder1/folder2/file.cfm'>

It seem to me incredibile, but CF don't recognize "/" as character to define path instead of Window's "\". How can I fix this problem? Is there a way to fix it without edit project's code (like define a rule for CF) ?

Thanks in advance,

R.

Views

432

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Does CF understand "/" ?

New Here ,
Sep 18, 2018

Copy link to clipboard

Copied

I have recently installed CF on Mac OSX. I tried to work on projects previously developed on Windows; in these projects paths are defined like this:

<cfset path = '/folder1/folder2/file.cfm'>

It seem to me incredibile, but CF don't recognize "/" as character to define path instead of Window's "\". How can I fix this problem? Is there a way to fix it without edit project's code (like define a rule for CF) ?

Thanks in advance,

R.

Views

433

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Sep 18, 2018 0
LEGEND ,
Jun 11, 2019

Copy link to clipboard

Copied

AFAIK, CF does recognize "/" as path delimiter, especially if running in a Mac/*nix platform.

Perhaps the issue is in the leading "/"?  That means root of the whole hard drive, if I'm not mistaken, not root of the site.  Try removing the leading "/" to see if that fixes the issue.

HTH,

^ _ ^

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 11, 2019 1
Bardnet LATEST
Participant ,
Jun 12, 2019

Copy link to clipboard

Copied

Would also guess the leading slash is the issue. CF even accepts slash as path separator in Windows.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 12, 2019 0