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.
Here are the first few lines of code, as requested
<?php
require_once('query_form.php');
$user = 'root';
$password = '';
if (ConnectToDefaultDatabase($user, $password) === False)
{
....
File1 above is actually index.php (shown here) and file2 is query_form - I just tried to simplify
Just out of curiosity - does the one who voted this down have the cojones to step forward and say why? I had a problem, I asked a question, it got solved, but along the way everyone who helped got +1 from me.
I don't really mind being voted down, just wondered why you didn't attempt to explain