Reputation: 3688
I am using Laravel 5.2 on Windows Server (IIS), and in my controller (app\Http\Controllers\Test\NewsletterController.php
) I need to require a file:
require_once dirname(__FILE__) . '../../../Mailwizz/setup.php';
(this file is stored in app\Mailwizz\setup.php
).
But I am getting the following error:
main(): Failed opening required 'C:\inetpub\vhosts\example.com\app\Http\Controllers\Test
../../../Mailwizz/setup.php' (include_path='.;C:\php\pear')
Maybe it has something to do with include_path
in php.ini, but I'm not sure how to setup this on Windows Server... here is my current php.ini:
; UNIX: "/path1:/path2"
;include_path = ".:/php/includes"
;
; Windows: "\path1;\path2"
;include_path = ".;c:\php\includes"
;
; PHP's default setting for include_path is ".;/path/to/php/pear"
; http://php.net/include-path
Do you know how can I fix this?
Upvotes: 0
Views: 1523
Reputation: 904
Replace
require_once dirname(__FILE__) . '../../../Mailwizz/setup.php';
with
require_once dirname(__FILE__) . '/../../../Mailwizz/setup.php';
I think that you error is caused by missing slash.
Upvotes: 1