Netbeans PHP require_once() problem

Posted by mawg on Stack Overflow See other posts from Stack Overflow or by mawg
Published on 2010-06-05T23:14:11Z Indexed on 2010/06/05 23:32 UTC
Read the original article Hit count: 248

Filed under:
|

I'm stumped!

In PHP in Netbeans (6.8), a project has two files, file1.php and file2.php

file1.php starts require_once('file2.php'); and I get

Warning: require_once(query_form.php): failed to open stream: No such file or directory in C:\xampp\htdocs\my_project\file1.php on line 3

Call Stack:
0.0741     322920   1. {main}() C:\xampp\htdocs\my_project\file1.php:0


Fatal error: require_once(): Failed opening required 'file2.php' (include_path='.;\xampp\php\PEAR') in C:\xampp\htdocs\my_project\file1.php on line 3

Call Stack:
0.0741     322920   1. {main}() C:\xampp\htdocs\my_project\file1.php:0

I tried require_once('./file2.php'); and require_once('.\file2.php'); since it is windows. I even added C:\xampp\htdocs\my_project\ to the projects include path and it shows up as such on the prject view and see file1.php and file2.php It doesn't show up on this error report, but possibly because Netbeans (or PHP ]) knows that C:\xampp\htdocs\my_project\ === .

Any suggestions? Btw, I am new to Netbeans, so it i sprobably something very obvious.

© Stack Overflow or respective owner

Related posts about php

Related posts about netbeans