Jump to content

include...simple error, why?


unsider

Recommended Posts

ok I have a file "extern.php" in: root/one/two/extern.php directory that I've tried calling in: root/one/index.php

 

with the two most basic methods:

 

<?php
include("../two/extern.php?action=active");
include("two/extern.php?action=active");
?>

 

The file exists, the action exists, and my don't worry my $_GET arrays are sanatized, but it throws this error:

 

include(../two/extern.php?action=active) [function.include]: failed to open stream: No such file or directory.

 

What's frustrating about this is, it's not only one of the most basic things, this is the only include, or very many that is throwing this error.

 

Thanks. If you need any more information let me know. Argh.

 

EDIT: caught my mistake, changed up the dir names, two = forum. Sorry about that

Link to comment
Share on other sites

Neither of the two include commands you listed include a file in the ../forum folder. What are the contents of the forum folder, where is it located and the file that includes forum/extern.php is it the same /root/one/two/extern.php file?

Link to comment
Share on other sites

To add to that .. means to go up one directory so if root/one/index.php trys to include ../two/file.php that means root/two/  instead just use two/file.php

 

@NHoj, I fixed my mistake, you can take another look if you'd like.

 

@unkwn

 

I've tried using "two/extern.php", that was the most logical, and first thing I thought of, but unfortunately it still returns the error.

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.