FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Help with include --Solved--





Roald
I have this code:
Code:
include("$id.inc");

I know this doesn't work but is there an other way to solve this?
hexkid
Roald wrote:
I have this code:
Code:
include("$id.inc");

I know this doesn't work but is there an other way to solve this?


It works for me.
Code:
<?php //maininc.php ?>
<html><head><title>inc</title></head>
<body>
<p>in maininc.php</p>
<?php
$id = 'inc';
include $id . '.inc';
include "$id.inc";
include("$id.inc");
?>
</body>
</html>

Code:
<?php // inc.inc ?>
<p>in inc.inc</p>
Roald
Thank you very much. It works now.
Related topics
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.