Skip to main content
Known Participant
November 14, 2010
Answered

Xampp SQL /php: when preview "websitename/index.php" web browser goes to localhost/index.php

  • November 14, 2010
  • 2 replies
  • 992 views

This is a beginner question.

I started to build a practice website in xampp/htdocs folder. however, when I preview a page "index.php" of the website, the browser goes to "localhost/index.php" and it displays an error message:

"Warning

: require_once(Connections/connQnpTest.php) [

function.require-once]: failed to open stream:  No such file or directory in

C:\xampp\htdocs\index.php on line

1

Fatal error: require_once() [function.require]: Failed opening required  'Connections/connQnpTest.php' (include_path='.;\xampp\php\PEAR') in  C:\xampp\htdocs\index.php on line 1"

It will display the correct webpage if I manually type in "localhost/"practiceWebsiteName"/index.php .

any idea, please?

This topic has been closed for replies.
Correct answer

It sounds like you might have your site definitions not set up correctly, from what I see, it should be:

Testing Server Folder C:\xampplite\htdocs\practiceWebsiteName\

URL Prefix http://localhost/practiceWebsiteName/

Check your settings.

Gary

2 replies

Correct answer
November 14, 2010

It sounds like you might have your site definitions not set up correctly, from what I see, it should be:

Testing Server Folder C:\xampplite\htdocs\practiceWebsiteName\

URL Prefix http://localhost/practiceWebsiteName/

Check your settings.

Gary

Known Participant
November 18, 2010

Thanks, Gary. that is the cause!