include (byname.php?lang=fr");
| From: | John Taylor-Johnston | Date: | Wed, 18 Feb 2004 18:30:21 +0000 |
| Subject: | include (byname.php?lang=fr"); | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-178150@lists.php.net to get a copy of this message | ||
I want to create a language option, so the resulting html is in French or English, depending. But
passing variables like this doesn't work:
<?php include ("../_phpcode/byname.php?lang=fr"); ?>
echo $lang; // 'fr'
Warning: main(): Failed opening '../_phpcode/byname.php?lang=fr'
for inclusion (include_path='.:/usr/local/share/pear') in
/home/users/q/qx04t9mu/www/.../parnoms.htm on line 125
It will work if I use a URL.
<?php include ("http://foo.com/_phpcode/byname.php?lang=fr");
?>
echo $lang; // 'fr'
Ideas on how to pass a variable?
John