PHP-DB给我;未能加载:";错误
更新:好的,问题是\r\epochTime(), 当我删除它时,它工作正常,没有错误。 有什么想法吗? 大约一个月前,我切换到RejectionDB,现在有一个项目正在运行,使用它很好 更新:从数据库中选择时,不会显示任何错误。仅当插入时。 我正在一个新的vps上建立一个新项目,并决定再次使用RejectionDB,因为它可以保存大量数据 我的问题是,每当我插入、抓取或删除数据时,它总是向我显示一条恼人的消息。 它显示我“加载失败:(然后是我尝试搜索或插入的内容)”PHP-DB给我;未能加载:";错误,php,rethinkdb,Php,Rethinkdb,更新:好的,问题是\r\epochTime(), 当我删除它时,它工作正常,没有错误。 有什么想法吗? 大约一个月前,我切换到RejectionDB,现在有一个项目正在运行,使用它很好 更新:从数据库中选择时,不会显示任何错误。仅当插入时。 我正在一个新的vps上建立一个新项目,并决定再次使用RejectionDB,因为它可以保存大量数据 我的问题是,每当我插入、抓取或删除数据时,它总是向我显示一条恼人的消息。 它显示我“加载失败:(然后是我尝试搜索或插入的内容)” e、 g.>[33M加载失
- e、 g.>[33M加载失败:/var/www/html/backend/app/app/0xb3fec39fb5b39eeeacdfb0a2aca6cc866d5a48.php
// Adding a new ETHEREUM address
$app->get('/newaccount', function (Request $request, Response $response) use ($ethApi, $accounts) {
$callbackUrl = '';
$destinatioAddress = '';
try {
// Call EthApi function to make new account
$password = randomPassword();
$newAccount = $ethApi->newAccount($password);
if (!empty($newAccount) || $newAccount !== null) {
// Good, new account was created, insert into databse and return the data
// Now insert into database
$data = [
'account' => $newAccount,
'callback_url' => $callbackUrl,
'destination_address' => $destinatioAddress,
'dateCreated' => \r\epochTime(time()),
'identifier' => randomIdentifier(),
'pass' => hashString($password),
];
// Insert the account
$accounts->insert($data);
// Return their account address
$response->withStatus(200);
$response->withHeader('Content-Type', 'application/json');
$message['ok'] = $newAccount;
return $response->withJson($message);
} else {
$response->withStatus(500);
$response->withHeader('Content-Type', 'application/json');
$error['err'] = 'Could not generate a new address';
return $response->withJson($error);
}
} catch (PDOException $e) {
$response->withStatus(500);
$response->withHeader('Content-Type', 'application/json');
$error['err'] = $e->getMessage();
return $response->withJson($error);
}
});
然后插入数据库的代码:
($accounts->insert($data)函数)
这就是除了创建eth地址的函数之外,我正在使用的所有函数,但是它返回一个字符串格式的地址
您可以在下图中看到,数据插入得很好:
只是猜测,但这显然不是你想要的文件名。如果是缓存的PHP文件,请尝试清除缓存。你应该向我们显示导致错误的代码的任何部分,它肯定会使用ANSI着色代码向你显示黄色文本,但我不确定它是否有效cause@RiggsFolly不,我没有这个文件。我只是检查了缓存,我甚至没有apcu_clear_缓存()函数已安装。我刚刚在apache上进行了一次优雅的重新启动…仍然显示该错误。@biesior我现在将发布我的代码。
0xb3fec39fb5…
-缺少的文件名也在您的数据库中的帐户
列中,我不知道,为什么以及它会发生什么,不管怎样,您的逻辑不是试图以某种方式动态访问该文件吗?我是af在raid中,您需要花更多的时间分析和调试代码。
// Insert into accounts
public function insert($data) {
\r\table("accounts")
->insert($data)
->run($this->conn);
}