require_once failed to open
Posted by: bexter (---.sympatico.ca)
Date: April 21, 2006 03:57PM

Greetings,

I am trying to learn PHP and I am having the problem. Basically the have three files, two files header.php and footer.php and the third index.php from with in the index.php I call the header.php and the footer.php files.

But I am receiving these error messages.

Warning: require_once(../includes/header.php) [function.require-once]: Failed to open stream: No such file or directory in E:\wamp\www\index.php on line 3

Fatal Error: require_once()[function.require] Failed opening required '../includes/db.php' (include_path='.;C:\php5\pear') in E:\wamp\www\index.php on line 3

I am totally lost with this error. Can someone out there please help?

Options: ReplyQuote
Re: require_once failed to open
Posted by: TwistedChaos (---.rochester.res.rr.com)
Date: April 21, 2006 05:18PM

ok first of all
how does your directory structure look?

like this :

www
|->includes
| |->header.php
| |->footer.php
|
|-> index.php

or like this

wamp
|->includes
| |->header.php
| |->footer.php
|
|-> www
| |->index.php
|
|->ETC


if it looks like the first one you code should ook like require_once(./includes/header.php)

notice the SINGLE "."



A Massive Heart Attack = Computer Crash sad smiley

I am a member of CAF -> Computer Addicts Forever smiling smiley

Options: ReplyQuote
Re: require_once failed to open
Posted by: bexter (---.sympatico.ca)
Date: April 21, 2006 05:25PM

It looks like the simmilar to the second example, with the exception that

www
|->www
| |->includes
| |header.php
| |footers.php
|index.php


does this make an sense?

Options: ReplyQuote
Re: require_once failed to open
Posted by: TwistedChaos (---.rochester.res.rr.com)
Date: April 21, 2006 05:41PM

have an Instant Messenger



A Massive Heart Attack = Computer Crash sad smiley

I am a member of CAF -> Computer Addicts Forever smiling smiley

Options: ReplyQuote
Re: require_once failed to open
Posted by: bexter (---.sympatico.ca)
Date: April 21, 2006 05:56PM

windows messanger

mcauley11@hotmail.com

Options: ReplyQuote
Re: require_once failed to open
Posted by: TwistedChaos (---.rochester.res.rr.com)
Date: April 21, 2006 06:14PM

ok i added you just waiting for your approval...

amysticallegend@hotmail.com is my name



A Massive Heart Attack = Computer Crash sad smiley

I am a member of CAF -> Computer Addicts Forever smiling smiley

Options: ReplyQuote


Sorry, only registered users may post in this forum.