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
https://forums.phpfreaks.com/topic/116878-includesimple-error-why/
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.

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.