delegate class - fatal error
Archived from the Xataface Users forum.
krrt — Fri Apr 17, 2009 1:07 pm
I’m just getting started with dataface, and I love it so far. However, I ran into a problem creating delegate classes. For example, I created a file ‘birds.php’ in the ‘birds’ directory. The contents of the file are
- Code: Select all
<? class tables_birds {} ?>
.
When I attempt to display this table with the file present I get the the following:
Fatal error: Class ‘tables_birds’ not found in D:\wamp\www\dataface\Dataface\Table.php on line 1049
I’ve tried creating delegate class files for other directories and get the same error.
For what it’s worth, my dev environment is WAMP on Vista. Versions are Apache 2.2.11, MySQL 5.1.32, php 5.2.9-1.
Thanks,
Kurt
fongchun — Fri Apr 17, 2009 1:41 pm
Make sure the birds directory is in the tables directory. So:
tables/birds/birds.php
Also make sure your php installation can handle short tag notation. So try using the <?php tag instead of just <?
krrt — Fri Apr 17, 2009 2:42 pm
Using ‘<?php’ instead of ‘<?’ did the trick. Many thanks for the quick and helpful reply.
Kurt