View Single Post
  #1 (permalink)  
Old 10-18-2007, 12:55 AM
HelloWorld's Avatar
HelloWorld HelloWorld is offline
PT Admin
Awards Showcase
Quality Tutorial 
Total Awards: 1
Join Date: Jun 2007
Location: In front of computer...
Posts: 1,122
iTrader: (0)
HelloWorld is a jewel in the roughHelloWorld is a jewel in the roughHelloWorld is a jewel in the rough
Icon4 Please Help with PHP!!!

I received this message:

Quote:
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /homepages/5/d158572600/htdocs/fb/broadcast/webtest/testScript.php on line 3
Here's the code that I have:

testScript.php
PHP Code:
<?php
class {
    
public function A1() {
        print 
"TEST A1";
    }
    
    
public function A2() {
        print 
"TEST A2";
    }
};
?>

test.php
PHP Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>TESTER</title>
</head>
<?php
include 'testScript.php';
print 
"TEST: " A1();
?>
<body>
</body>
</html>

__________________
PHP Code:
System.out.println("Hello World!"); 

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
Reply With Quote