Can't get "includes" working - wamp 2.0f - any ideas ?
Posted by: scanreg (---.phlapa.east.verizon.net)
Date: December 17, 2008 02:58AM

I installed wamp 2.0f on WinXP box.

In www, I uploaded the following:

/test/includes/menu.inc.php
/test/index.php

In the index.php, I use a php includes:

< ? php include('includes/menu.inc.php') ; ? >

However, when I call /test/index.php in Firefox browser, I get these errors:

Warning: include(includes/menu.inc.php) [function.include]: failed to open stream: No such file or directory in C:\wamp\www\test\index.php on line 15

Warning: include() [function.include]: Failed opening 'includes/menu.inc.php' for inclusion (include_path='.;C:\php5\pear') in C:\wamp\www\test\index.php on line 15

Options: ReplyQuote
Re: Can't get "includes" working - wamp 2.0f - any ideas ?
Posted by: yfastud (Moderator)
Date: December 17, 2008 04:46AM

Quote

< ? php include('includes/menu.inc.php') ; ? >
so you have it exactly like that? it's syntax error, so try this

<?php include('includes/menu.inc.php'); ?>

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: Can't get "includes" working - wamp 2.0f - any ideas ?
Posted by: scanreg (---.phlapa.fios.verizon.net)
Date: December 17, 2008 01:37PM

yfastud Wrote:
-------------------------------------------------------
> > < ? php include('includes/menu.inc.php') ; ? >
>
> so you have it exactly like that? it's syntax
> error, so try this
>
>
> <?php include('includes/menu.inc.php'); ?>
>

Actually, I wasn't sure if the forum script would strip the code if I put the beginning and end tags in correctly. So, I put in some spaces ; ? >

<?php include('includes/menu.inc.php'); ?>

In the real code, I already do have the includes call above exactly as you mentioned.

So, it appears to be something else

What might be some other possibilities?

Thanks very much :-)



Edited 3 time(s). Last edit at 12/17/2008 01:38PM by scanreg.

Options: ReplyQuote
Re: Can't get "includes" working - wamp 2.0f - any ideas ?
Posted by: stevenmartin99 (---.b-ras1.blp.dublin.eircom.net)
Date: December 17, 2008 01:47PM

Most like it probably cant find the file...

maybe ur in a folder...
and it cant find it as ur too deep tree levelwise

for example

if a file file.php is calling this menu.inc.php file then it would have to look like so

www/file.php

www/includes/menu.inc.php


is this how the files are ?

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: Can't get "includes" working - wamp 2.0f - any ideas ?
Posted by: yfastud (Moderator)
Date: December 17, 2008 02:49PM

make sure menu.inc.php doesn't have hidden extension which results real filename is menu.inc.php.txt or menu.inc.php.php

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote


Sorry, only registered users may post in this forum.