Code: Select all
<?php
require("inc/ock.php?x=3");
or
include("inc/ock.php?x=3");
?>Moderator: General Moderators
Code: Select all
<?php
require("inc/ock.php?x=3");
or
include("inc/ock.php?x=3");
?>Code: Select all
<?php
include("http://localhost/test/b.php?x=5");
?>Code: Select all
<?php
echo $_GET['x'];
?>Regards,The section '[url=http://www.php.net/include#AEN4518]Example 11-3. Basic include() example[/url]' of the [url=http://www.php.net/include]include()[/url] function reference wrote:vars.phptest.phpCode: Select all
<?php $color = 'green'; $fruit = 'apple'; ?>Code: Select all
<?php echo "A $color $fruit"; // A include 'vars.php'; echo "A $color $fruit"; // A green apple ?>
???URL wrappers is on in most hosts