T
T
Twelfth Doctor2017-03-28 08:45:29
phpstorm
Twelfth Doctor, 2017-03-28 08:45:29

Why doesn't PHPStorm see variables in an include file?

Hello! Tell me, why if you include()connect a file in the code and then use a variable from this file, then PHPStorm will underline it as undefined (undefined variable)?
Example:

include ('nginxconf.php');
        include ('apacheconf.php');
        file_put_contents("/home/user/$this->mainname.conf" , $apacheconf);
        file_put_contents("/home/user/$this->mainname" , $nginxconf);

nginxconf.php :
<?php
$nginxconf = "";

apacheconf.php
<?php
$apacheconf = "";

When you start the program everything goes fine.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
IvanBox, 2022-03-25
@IvanBox

Here is a fresh answer to your question, which also interested me today: https://www.jetbrains.com/help/phpstorm/php-undefi...
and here: https://stackoverflow.com/questions/22476778/ phpst...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question