Jump to content

[SOLVED] INCLUDE'ing to a different folder..?


woolyg

Recommended Posts

Hi all,

 

Pretty sure this has been asked before, but I can't find conclusive help on it.

 

I've got a file structure

 

-www (containing normal site files)

-www/inc (containing includes like db.php, session.php etc)

-www/accounts (containing an area for customer login)

 

I'm working on www/accounts/signup.php and am trying to use the following code:

 

<?php
include "/inc/session.php";
?>

 

...so that certain session elements can be set. however, I'm getting an error

 

Warning: include(/inc/session.php) [function.include]: failed to open stream: No such file or directory in E:\XAMPP\xampp\htdocs\mysite\accounts\signup.php on line 3 (I'm using Xampp as a testing server as well as my live server)

 

- I've tried various combo's of paths to the sessions file, but the server is not allowing a proper include to it.

 

How can I fix this?

 

Thanks,

Woolyg

Link to comment
https://forums.phpfreaks.com/topic/76831-solved-includeing-to-a-different-folder/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.