我正在使用Amfphp创建一个新的Flex应用程序。在编写PHP服务时,我发现在使用'define()'函数声明了一些常量后,Amfphp服务浏览器无法加载服务并显示函数。
我的代码如下所示:
<?php
require_once ('vo/VoCourse.php');
require_once ('vo/VoLesson.php');
require_once ('vo/VoSubject.php');
require_once ('vo/VoTopic.php');
define("DATABASE_SERVER","localhost");
class AtlasService {
// This simple function can be used to test the service.
public function helloWorld() {
return "Hello World";
}
}
如果我删除'define()'函数,一切都很好。我错过了一些明显的东西吗?