| 
	
 | 
 Posted by Pafcio on 01/29/07 18:31 
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
 
  
Navigation:
[Reply to this message] 
 |