Kan man include med variable,
jeg har flg. kode
<pre>
<? include ("$siteplaz"); ?>
</pre>
og den giver flg. fejl
Warning: Failed opening '
http://www.udvikleren.dk/index.php' for inclusion (include_path='') in C:\\Programmer\\Apache Group\\Apache\\htdocs/pcoquality/pcoq2.php on line 26
hele kode ser sådan her ud
<pre>
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2 <html>
3 <head>
4 <title>Nyt dokument</title>
5 </head>
6
7 <body>
8 <?
9 //$siteid = $_GET["siteid"];
10 $database = mysql_connect("localhost","**********************","*******************");
11 mysql_select_db("test",$database);
12 $foresp = mysql_query("SELECT * FROM pcoquality WHERE Siteid='$siteid' ");
13 $row = mysql_fetch_array($foresp);
14 $siteplaz = $row["Sitepla"];
15 $siten = $row["Siten"];
16 $sitedesc = $row["Sitedesc"];
17 $siteqi = $row["Siteqi"];
18 $siteqt = $row["Siteqt"];
19 ?>
20 <table width="100%" height="100%" border="1">
21 <tr>
22 <td width="100%" height="20%"><?echo("The site $siten have get a Quality price for $sitedesc as the quality type $siteqt<img src='$siteqi' height='120' width='143' > ");?></td>
23 </tr>
24
25 <tr>
26 <td width="100%" height="*"><? include ("$siteplaz"); ?></td>
27 </tr>
28 </table>
29
30
31 </body>
32 </html>
33
</pre>
Jeg ved at den henter alle de andre varibler og det ser også ud til at den henter den, men hvorfor viser den det ikke?
hvorfor kan den ikke include det?