can anyone assist me in possibilities to why my includes receive this error:
Warning: main(/web_calendar/connect.php): failed to open stream: No such file or directory in c:\inetpub\wwwroot\web_ calendar\admin.php on line 45
the file is called admin.php and resides in a folder called web_calendar which is at the root level on my site.
the include is called as such :
<?php include("/web_calendar/connect.php"); ?>
I'm using IIS instead of apache
thanks in advance,
Bruce Gilbert
Webmaster
DPS
warning: failed to open stream error
Moderator: General Moderators
-
method_man
- Forum Contributor
- Posts: 257
- Joined: Sat Mar 19, 2005 1:38 am
post the code
post the code
matt
matt
-
bruceg
- Forum Contributor
- Posts: 174
- Joined: Wed Mar 16, 2005 11:07 am
- Location: Morrisville, NC
- Contact:
well basicly I get an error everytime I call a file with include.
Here is code from a sample file with different ways to call the include with PHP and they all give me errors.
the includes are located within a file called SSI which is at the root level.
thx,
-Bruce
feyd | Please review how to post code using
Here is code from a sample file with different ways to call the include with PHP and they all give me errors.
the includes are located within a file called SSI which is at the root level.
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>include test</title>
</head>
<body>
<!--quick test by Chris Ogden for DPS -->
This file is located in: "<b><?php echo dirname(__FILE__) ; ?></b>"
<p><p>
absolute path (should always work): "<?php include ' c:\inetpub\wwwroot\SSI\footer.htm'; ?>"
<p><p>
separator: "<?php echo PATH_SEPARATOR; ?>"
<p><p>
include_path before: <?php echo get_include_path(); ?>
<?php set_include_path(get_include_path() .PATH_SEPARATOR.' c:\inetpub\wwwroot\SSI'); ?>
<br>
include_path after adding SSI: <?php echo get_include_path(); ?>
<p><p>
just the filename should now work: "<?php include('footer.htm'); ?>"
<p><p>
no lead slash (should only work if calling file is "above" the SSI directory): "<?php include("SSI/footer.htm"); ?>"
<p><p>
dots (should only work if in a subdirectory at the same level as SSI): "<?php include("../SSI/footer.htm"); ?>"
</body>
</html>thx,
-Bruce
feyd | Please review how to post code using
Code: Select all
andCode: Select all
tags. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
Code: Select all
include('/foo/bar.php');