Also im Browser funktioniert die Datei ohne Probleme nur in der Console erhalte ich folgende Fehlermaldungen, Doch zuerst stelle ichden Quellcode dar:
- Code: Select all
<?php
include("config.inc.txt");
$conn = @mysql_connect($mysqlhost, $mysqluser, $mysqlpasswd);
mysql_select_db($mysqldb);
$a ="1";
while ($a != 5)
{
if($result = mysql_query("SELECT * FROM schiffe ")) {
while($row = mysql_fetch_object($result))
{
$pos = ($row->x);
$id = ($row->id);
printf("<table valign=top width=750 border=1>
<tr>
<td width=375 align=center >%s</td>
<td>$id</td>
<td align=right >$pos</td>
</tr>
</table>
",
htmlspecialchars($row->name));
$pos++;
$new_position=" UPDATE schiffe SET x='$pos' WHERE id='$id'";
$aus_new_position = mysql_query($new_position);
}
}
else
{}
echo"Bewegt";
$a++;
}
php?>
und nun die Fehlermeldung. Vielleicht könnt ihr ja etwas damit anfangen
- Code: Select all
[root@localhost test]# ./test.php
./test.php: line 1: ?php: Datei oder Verzeichnis nicht gefunden
./test.php: line 2: syntax error near unexpected token `"config.inc.txt"'
./test.php: line 2: `include("config.inc.txt");'
[root@localhost test]#