Object Interfaces


Posted on 16th Feb 2014 07:03 pm by admin

EDIT: Never mind, I just updated to php 5.

Hey all,

I'm currently experimenting with php object interfaces. However, whenever I try to implement one, I get a php error.


interface iTemplate
{
public function setVariable($name, $var);
public function getHtml($template);
}


The error is:Code: Parse error: parse error, unexpected T_STRING in /path/test.php on line 1

What am I doing wrong? If it matters, my server is running php version 4.3.11.

269 Like 28 Dislike
Previous php-forum Next php-forum
Other php-forum

form submit at godaddy?
Trying to test form submission at GoDaddy and it does not seem to work. Here's the page...

h

db entry based on primary key
My "topics" table contains 10 entires
*--------------*
topicid topic
------

PHP Code To Change Font Color in Table Cell
I would appreciate help with the following snippet of my php code. I am just trying to change the f

Page Reload
I am having issues getting a page to reload after I submit data to a database. This form should inp

php email checker
I am having alot of trouble finding info on how to do these email things. I need to do the following

Hits this week counter
I have a counter on my site that tracks hits, IP's, etc. into a mySQL database. It also includes the

Error with login script
I am getting an error with my login script:

Error:
Code: Warning: Cannot modify header inf

How do I give a developer access to a specific directory and nothing else?
I want to give a develop access to a specific directory and nothing else

I can give them an F

HTML Email rec'd as Source Code
The code does create and send the email successfully. However, the message shows as html code and n

php libs/ browsercap.in
ok i have a host that refuses to stay current. they control my php settings and libs. is there a way

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash