0
我目前正在php中创建一个模块。Class.autoload(监督它),并手动获取类
下面是一个包含在我的主类文件中的函数。
...
$xmldebug = simplexml_load_file($response);
$xml = new SimpleXMLElement($response);
if (!$xml)
throw new Exception(_("Registry return malformed XML"));
$result_attributes = $xml->response->result->attributes();
$response_code = (string)$result_attributes["code"];
if ($response_code == RFC3730_RESULT_CODE::ERR_CMD_FAILED ||
$response_code == RFC3730_RESULT_CODE::ERR_CMD_FAILED_END_SESSION)
throw new Exception(_("Registry error"));
if ($response_code == RFC3730_RESULT_CODE::ERR_CMD_FAILED_END_SESSION ||
$response_code == RFC3730_RESULT_CODE::ERR_AUTH_END_SESSION ||
$response_code == RFC3730_RESULT_CODE::OK_END_SESSION ||
$response_code == RFC3730_RESULT_CODE::ERR_SESSION_LIMIT_EXCEEDED)
$this->IsConnected = false;
if ($response_code == RFC3730_RESULT_CODE::ERR_OBJECT_NOT_EXISTS)
throw new ObjectNotExistsException();
if ($response_code == RFC3730_RESULT_CODE::ERR_OBJECT_STATUS_PROHIBITS_OP)
throw new ProhibitedTransformException();
if ($response_code == RFC3730_RESULT_CODE::ERR_OBJECT_EXISTS)
throw new ObjectExistsException();
echo $response_code;
$ok_codes = array( RFC3730_RESULT_CODE::OK,
RFC3730_RESULT_CODE::OK_ACK_DEQUEUE,
RFC3730_RESULT_CODE::OK_END_SESSION,
RFC3730_RESULT_CODE::OK_NO_MESSAGES,
RFC3730_RESULT_CODE::OK_PENDING
);
$is_success = in_array($response_code, $ok_codes);
...
我在做一些测试“localy”我有enum.RFC3730_RESULT_CODE文件(其中包含RFC3730_RESULT_CODE类)与其他文件在同一目录。 现在,我试图让我的平台再次把文件在同一目录作为我的主类对这个模块,但我得到下面的错误
Exception: Unable to load/locate class RFC3730_RESULT_CODE IN /xxxx/xxxx/xxxx/core/class.autoload.php(127)
class.autoload.php文件进行加密,从而没有任何我可以监督它并获得使用RFC3730类吗?