Page 1 of 1
redirecting
Posted: Sat Apr 07, 2007 11:38 am
by enemeth
Hi there got this error
Warning: main(/checkuser.php): failed to open stream: No such file or directory in /home/www/thetruthdiscovered.com/members/aboutus.php on line 2
now the checkuser.php file is located in the root directory ,
http://www.thetruthdiscovered.com
how do i indicate the location of the file in my .php file 'checkuser.php' ?
Thank you
Elaine
Posted: Sat Apr 07, 2007 12:09 pm
by Ambush Commander
By editing line 2 to point wherever aboutus.php is?

Posted: Sat Apr 07, 2007 1:29 pm
by enemeth
the checkuser.php is in the main directory ,
not in the members area which is a folder within the main root
Posted: Sat Apr 07, 2007 1:36 pm
by nickvd
I hope you're not asking how to reference a file in a higher level folder. I say that only because it's something that any entry level course teaches on day two. Any programmer should be expected to know such basic things like this.
../filename
Posted: Sat Apr 07, 2007 1:54 pm
by enemeth
yea i am , actually , never took a course , and am learning this as i go along , i created three webpages so far and it is working out great ! i am learning alot as i go along,
i no how to reference other pages , i aint that dumb, but it was just that i was in a higher folder hierachy and it would direct it back to the lower one i thought i was typing something wrong,
mindu ,
thank you for helping
Elaine
Posted: Sun Apr 08, 2007 7:42 am
by nitrino
i always use this:
Code: Select all
define('ROOT',$_SERVER['DOCUMENT_ROOT']);
and anywhere...
Code: Select all
include ROOT.'/folder/something.php';
never have a problems with including files.
Posted: Sun Apr 08, 2007 3:34 pm
by RobertGonzalez
You could also use:
Code: Select all
<?php
define('PAGEROOT', dirname(__FILE__) . '/');
?>