如何使用php.ini在Wamp www文件夹外包含一个路径?

My projects uses some global files that should be included outside the www folder.

I have tried to include the path in the php.ini like this

include_path = ".;c:\php\includes;c:\Users\Pim\Documents\CMS\globals\php"

this global php folder contains some files I want to include in my project within the www folder.

for example, I want to include c:\Users\Pim\Documents\CMS\globals\php\system\init.php by doing this in de index.php within the www-folder:

include 'system/init.php';

What am i doing wrong so far?

When i check the phpinfo of my localhost, I says:

include_path
.;c:\php\includes;c:\Users\Pim\Documents\CMS\globals\php; (Local Value) .;c:\php\includes;c:\Users\Pim\Documents\CMS\globals\php; (Master Value)

Using include 'system/init.php'; tells PHP to include from a specific folder.

You are telling php the folder should exist below the current folder the script is execution from.

Try

include 'init.php';

Then it will search the include path

Have you try to include using relative path?

I'm using xampp include "/tmp/test.php" at C:/tmp/test.php from xampp htdocs and it has worked.

You're doing it as include "tmp/test.php" which is including the child directory