I'm using eclipse and a private GIT repository and then WAMP Server on my local machine (Win 8.1). I have a PHP application that I'm trying to emulate on my local machine but an integral include file is "/var/site.php". I'm trying to setup an include_path in php.ini but I keep getting not found errors. My path locally is:
c:/users/xxxxxx/git/project/site.php
I'm trying
; UNIX: "/path1:/path2"
include_path = ".:/var/:c:/users/xxxxxx/git/project/"
This doesn't work. I'm confused on whether to use UNIX or WINDOWS in php.ini. I'm getting:
Fatal error: require_once(): Failed opening required '/var/site.php' (include_path='.:/var/:c:/users/xxxxxx/git/project/')
Thats not surprising really, you are using a unix path statement and you are running on windows.
Edit your php.ini file ( using the wampmanager icon menus so you get the right file)
Find this section
; UNIX: "/path1:/path2"
;include_path = ".:/php/includes"
;
; Windows: "\path1;\path2"
;include_path = ".;c:\php\includes"
And change the Windows path statement like so
include_path = ".;/var/;c:/users/xxxxxx/git/project/"
Basically the path statements seperator in UNIX is :
but as windows uses the colon in the drive identifier ie C:
windows uses the ;
semicolon as the seperator on a path statement. You just got the 2 mixed up.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.