Ahref Links warnings in editor
I'm sorry for such easy question.
When I use this in phpStorm 4
echo ' <a href = "/mycontroller/myaction"> my controller action</a>
inside my codes I get this warning:
Cannot resolve directory 'myfolder'
Cannot resolve file' myaction '
But they are controllers of my cakePHP site, so they don't exist as folder and file names.
How can I solve this warning?
Thank you in advance.
请先登录再写评论。
Hi there,
Because you are outputting this string via echo, the text between quotes is recognized as HTML because appropriate language is injected there (it should have light green background, if using default color scheme).
There are 2 possible solutions:
P.S.
Recently PhpStorm has received initial (and very basic) support for MVC Frameworks (currently Symfony2 and Yii). When this will function properly and your framework will be supported, I would expect to PhpStorm handle such situation automatically by resolving such URL to proper contorller/action (so no warning is shown).