Recent Topics

1 Dec 04, 2008 10:26    

My b2evolution Version: Not Entered

Hi!
I have 5 skins, with the same php code in each folder, I would like not to have to copy the same code each time, so I have tried to use function include, for example, in red_skin/index.main.php I did :

include(../common_skin/index.main.php);

,
but it won't work at all! I get a "no such file or directory" error
Why?
How do I mutualize the code?
Thanks for you answers
EDIT : After more research, I found this syntax, that works

include(dirname(__FILE__)."/../chevalmag_blog_page_common/index.main.php");


I think that it is because the path must be given relatively to index.php, doesn't it?

2 Dec 04, 2008 10:28

apart from the lack of quotes, try

include dirname(__FILE__).'/../common_skin/index.main.php';

¥

3 Dec 04, 2008 12:21

Thank you, it works


Form is loading...