Cannot resolve directory 'unresolved file references in HTML'

Hello all,

In my project I'm loading the website through the index.php file. So when creating an URL, it points to directory's that don't even exists, because they are actually database driven. So when I have this line of code I'm getting an unresolved warning.

 
echo "<li><a href='".HOST."/accessoires/" . $pg['permalink'] . "/' class='link'>{$pg['naam']}</a></li>";


Cannot resolve directory 'accessoires'

This inspection checks unresolved file references in HTML

How do I fix this error?

2 comments
Comment actions Permalink

Hi there,

The best way would be to assemble full URL first and then output it in one go (and not assemble it inside href attribute).

Something like this:

$url = HOST . "/accessoires/" . $pg['permalink'] . "/";
echo "<li><a href='" . $url . "' class='link'>{$pg['naam']}</a></li>";


Other approach -- is to disable such inspection completely as it definitely not helping in such situations.

0
Comment actions Permalink

Thanks,

I went for the solution to disable inspection on this particular issue. There is not 1 file reference working in HTML for this project.

0

Please sign in to leave a comment.