Cannot resolve site-relative file paths
2 posts
• Page 1 of 1
Cannot resolve site-relative file paths
I cannot find an answer to this issue anywhere on the web.
Currently, on my PHP pages, when I create an HTML reference to say, a CSS file; like so:
Visual Studio (2012) is unable to resolve the path to that file, and will not load my layout.css file. The folder "css" sits on the same file level as the page I am debugging (F5) in VS. I have even tried to place the files themselves on the same level without stepping through a folder.
I found a potential solution elsewhere, using ASP.NET:
Source:http://weblogs.asp.net/jeffwids/archive/2009/06/07/why-does-visual-studio-not-resolve-my-css-class-names.aspx
But I was unable to implement this solution using PHP.
Is the inability to resolve (interpret) the relative paths associated with PHP Tools? Or is this strictly a Visual Studio 2012 problem?
If it's the latter, can someone provide a potential work around? Perhaps it is a problem with the root directory that I cannot find?
Thank you very much for any help you can provide. This is killing me right now.
Currently, on my PHP pages, when I create an HTML reference to say, a CSS file; like so:
- Code: Select all
<link rel="stylesheet" href="/css/layout.css" type="text/css" />
Visual Studio (2012) is unable to resolve the path to that file, and will not load my layout.css file. The folder "css" sits on the same file level as the page I am debugging (F5) in VS. I have even tried to place the files themselves on the same level without stepping through a folder.
I found a potential solution elsewhere, using ASP.NET:
- Code: Select all
<link href="/content/default.css" rel="stylesheet" type="text/css" />
<% if (false) {%>
<link href="../../content/default.css" rel="stylesheet" type="text/css" />
<% } %>
Source:http://weblogs.asp.net/jeffwids/archive/2009/06/07/why-does-visual-studio-not-resolve-my-css-class-names.aspx
But I was unable to implement this solution using PHP.
Is the inability to resolve (interpret) the relative paths associated with PHP Tools? Or is this strictly a Visual Studio 2012 problem?
If it's the latter, can someone provide a potential work around? Perhaps it is a problem with the root directory that I cannot find?
Thank you very much for any help you can provide. This is killing me right now.
- MichaelPHPDev
- Posts: 1
- Joined: April 16th, 2013, 5:52 pm
Re: Cannot resolve site-relative file paths
Hi,
PHP Editor does not validate paths to linked resources, so I assume you are using HTML Editor to edit .php files? Does your PHP code highlight itself?
Thanks,
PHP Editor does not validate paths to linked resources, so I assume you are using HTML Editor to edit .php files? Does your PHP code highlight itself?
Thanks,
Jakub Misek │ DEVSENSE s.r.o. | @misekjakub │ jakub@devsense.com │
-
Jakub Misek - Posts: 2092
- Joined: January 4th, 2012, 2:42 pm
- Location: Prague
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 146 guests