开发者

Problems writing a module for phpBMS

I am trying to write a small, simple module for phpBMS.

I am basically modifying and simplifying one that exists, and have gotten to the stage of creating the table and pages in phpBMS itself and making the module installable.

I am now trying to create the php page that will allow for new records to be inserted into the table via phpBMS, and I get the following error:

Fatal error: Class 'guests' not found in xxx_addedit.php on line 45

The file is actually comments until line 40, so I have posted the first 9 lines, and line 45 corresponds to the 5th line

include("../../include/session.php");
include("include/tables.php");
include("include/fields.php");
include("include/menu.php");
$thetable = new xxx($db, "tbld:4e28e4bd-d4b0-1a2b-4d87-a4ddf8a54a86");
$therecord = $thetable->processAddEditPage();
if(isset($therecord["phpbmsStatus"]))
    $statusmessage = $therecord["phpbmsStatus"];
$pageTitle="xxx";

The original file I am modifying is viewable online in the source here, as well as the includ开发者_JAVA技巧e files referenced.

It was my understanding that I should be able to make a new instance of the table class called whichever I like, so I am not exactly why it seems I have to define a class for each table?

Any advice here would be greatly appreciated.


Nevermind, I solved it by modifying the include file where classes are defined.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜