hi,
Can anybody tell me what is wrong with this line of code?
<?php include echo basename($file); ?>
Thanks,
Mike
I'm not quite sure what you're trying to do but I'm guessing that you don't want the echo part as this will print to screen rather than include the file.
Sorry, maybe I should have explained it better. I have a table and wish to include a particular php file included in the URL,
ie, table.php?ref=file.php
so it includes file.php into table.php
Ok, I think (although I could be wrong!) all you need is this:
<?php
$filename = $HTTP_GET_VARS['ref']; include "$filename";
?>
That's assuming that the file you pass through the URL and the table.php file are in the same directory.
Thats done it! Thanks 😉