문제

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