In my PHP project I'm using static-file server (ex img.domain.com). That server path I have is stored in $config table. ($this->config['file_server']).

During developement static server-file is local server (main root).

Problem is that when using it I don't get path suggestions (ctrl+space) eg:

<img src="<?=$this->config['file_server'];?>image.png">

Can I make phpstorm to interprate $this->config['file_server'] as "/" sign?

有帮助吗?

解决方案

I've asked the same question on jetbrains forum: http://devnet.jetbrains.com/message/5515452#5515452

Anwser from Andriy Bazanov"

Hi there, You cannot.
The actual inspection is disabled in such situations on purpose (to avoid false warnings .. since it is unknown in advance what that path would be). IDE currently does not allow to provide value or return type for individual array elements anyway On another hand -- it works just fine if leading "/" is actually present, i.e. config['file_server'];?>/image.png"> (in such case path completion works)

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top