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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.