官术网_书友最值得收藏!

Adding an include path

One of the software engineering principles says that components should be reusable, that is, the structure of the software should be modular. This is a practice accepted worldwide, but this adds an overhead to the translation (interpreter or compiler) to link the modules together by first finding them. PHP is no different.

Getting ready

The PHP interpreter has to search for the required files/folders/resources every time the script is run. PhpStorm can, however, decrease the time required to search for the files/folders by allowing you to set the include path. The include path is the base directory under your operating system that contains all the files and folders to the dependencies.

How to do it...

You have the freedom to set this in PhpStorm. Go to Settings | PHP | Include Path. Select the new path. Click on Apply. Done! Take a look at the following screenshot, which illlustrates this point:

How to do it...

Tip

You should always make sure that you plan how to organize your files and folders beforehand so that a minimum number of include path settings are required.

If a folder is provided in the include path, it will be helpful in autocompletion for include(), require(), and so on.

主站蜘蛛池模板: 德化县| 瓦房店市| 昌黎县| 松阳县| 祁门县| 洛南县| 郧西县| 北安市| 都江堰市| 宿迁市| 马龙县| 龙南县| 灵寿县| 祁阳县| 平谷区| 垦利县| 广安市| 韩城市| 三门峡市| 马龙县| 库车县| 吉林省| 长岛县| 无棣县| 黔西县| 乐东| 昔阳县| 桐庐县| 洛阳市| 伊春市| 保山市| 聊城市| 桂阳县| 太原市| 安新县| 五家渠市| 香港| 东山县| 开平市| 双牌县| 灌云县|