Hello all,

I am passing a variable like so:
<a href="link.php?foo=bar.php">

On the "link.php" page, I have this simple code:
<?php
$job = $_GET['foo'];
echo "$job";   // for error checking
include 'path/to/$job';
?>

The 'echo "$job";' statement works just fine, but the outbout for the
include statement looks like this:
bar.php
Warning: Failed opening 'scripts/$job' for inclusion
(include_path='.:/usr/local/lib/php') in /usr/local/www/data-dist/link.php
on line 142

Can I not use a $variable in an include 'something.php '; statement?

Thanks in advance,
Ron Clark



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to