Reply to newbie error, very strange

Your name:

Reply:


Posted by Pafcio on 01/29/07 18:23

hi,

I've got a problem that I cant deal with:

I've got a a simple class in a file browse.inc:

<?php
class Connection
{
public $conn;
public $result;
public $resultMeta = array();
}

?>

the file browse.php looks like this:

<!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html401/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-2">
<title>Connection</title>
</head>
<body>
<pre>

<?php

include "browse.inc";
?>

</pre>
</body>
</html>

when I run this file everything is ok.

but when I run this file from a file index.php through a z link:

<!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html401/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-2">
<title>Connection</title>
</head>
<body>

<h1>DB programming using MySQL and PHP 5.0</h1>

<p>This is a website created in order to get a credit from a DB
laboratoty.
It displays a table and allows to add, remove and update records from
this table.
What would you like to do??</p>

<pre>
<?php
print "\n <a href=http://localhost\DB\browse.php> Browse table
</a>";
?>

</pre>
</body>
</html>

then I get the error parse error, expecting `T_OLD_FUNCTION' or
`T_FUNCTION' or `T_VAR' or `'}''

in line 4 of file browse.inc.

I dunno what may cause this error, maybe someone of you would like to
help me with this.

Pafcio

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация