Page 1 of 1

Can anyone tell me why this happen?

Posted: Fri May 30, 2008 3:04 am
by aetoc
I have this code in a page.

Code: Select all

 
$spaw_root = $_SERVER['DOCUMENT_ROOT'].'/new/administration/html_editor/';
 
echo $spaw_root;
include ($spaw_root.'config/spaw_control.config.php');
include ($spaw_root.'class/toolbars.class.php');
include ($spaw_root.'class/lang.class.php');
 
When I run the page I get this message.

/home/procell/procell-www/new/administration/html_editor/
Warning: main(/home/procell/procell-www/administration/html_editor/class/toolbars.class.php) [function.main]: failed to open stream: No such file or directory in /home3/procell/procell-www/new/administration/html_editor/spaw_control.class.php on line 19

If you see, the echo is correct but in the include the /new dosn't appear.

Can anyone help me? :banghead:

Thanks in advance.

Re: Can anyone tell me why this happen?

Posted: Fri May 30, 2008 3:52 am
by onion2k
spaw_control.class.php is trying to include a file but it's using the wrong path.

Re: Can anyone tell me why this happen?

Posted: Fri May 30, 2008 3:59 am
by aetoc
Yes I know that but the $spaw_root is the correct path.

What I can't understand is why when I echo the var its right and when I use it in the include is wrong.

The echo displays this: /home/procell/procell-www/new/administration/html_editor/

but the include displays this: /home/procell/procell-www/administration/html_editor/

* look at the /new/

Re: Can anyone tell me why this happen?

Posted: Fri May 30, 2008 4:54 am
by onion2k
What does line 19 of spaw_control.class.php say?

Re: Can anyone tell me why this happen?

Posted: Fri May 30, 2008 9:54 am
by aetoc
is the line 5 of the code that I have post.

The massage repeats for the line 6 and 7 of the code.

Re: Can anyone tell me why this happen?

Posted: Fri May 30, 2008 11:19 am
by panic!
klortho wrote:The error message is the Truth. The error message is God