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

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.

主站蜘蛛池模板: 淮安市| 玛纳斯县| 博野县| 太原市| 澄迈县| 鄂尔多斯市| 大同县| 定结县| 崇礼县| 洱源县| 胶州市| 广德县| 盱眙县| 滦平县| 安龙县| 潮州市| 乡城县| 孝昌县| 金华市| 芦溪县| 宁晋县| 周至县| 天峨县| 定远县| 东丽区| 盘山县| 荥经县| 泰和县| 江川县| 孙吴县| 大姚县| 二连浩特市| 石嘴山市| 湘潭县| 满城县| 乐清市| 大庆市| 汝南县| 通海县| 舟曲县| 绥阳县|