homepage Welcome to WebmasterWorld Guest from 54.166.95.146
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
[PHP] Why cant I include a file?
GrodanBoll




msg:1292153
 10:23 am on Mar 12, 2002 (gmt 0)

Hi

I'm getting this row in the Apache error-log:

[Tue Mar 12 11:16:27 2002] [error] PHP Warning: Failed opening 'sidamedspalt.php?avdid=1&sidnamn=hem' for inclusion (include_path='.') in c:\program files\apache group\apache\htdocs\wwhkr3\processor.php on line 106

Dont the point mean that the the 'include' should look in the same folder that the processor.php is in?

/Grodan :)

 

sugarkane




msg:1292154
 10:33 am on Mar 12, 2002 (gmt 0)

Yep, the include will look in the same folder. I think the problem is that you're trying to pass variables using a query string - that won't work with 'include', only via http

Try rewriting it as:

$avdid=1;
$sidnamn=hem;
include("sidamedspalt.php");

ie define your variable first and then do a plain 'include'

GrodanBoll




msg:1292155
 12:41 pm on Mar 12, 2002 (gmt 0)

Seems to work fine, I'll try that.

Thx :)

/Grodan

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved