我收到错误
' production.ERROR:exception' ErrorException'消息'未定义 index:HWID_App'
自从我将MSSQL连接添加到文件以来。 (我已将数据库配置添加到database.php)
<?php
[...]
public function Conn_Guid(Request $r)
{
foreach ($r->input() as $file) {
DB::connection('sqlsrv')->select(array($r->ip(),$file['HWID_App']), 'exec dbo.GSP_INSERT_AUTH_DATA(?,?,..)');
$exists12 = DB::table('GuildLog')->where('HWID', $file['HWID_App_Log'])->exists();
if ($exists12) {
die;
} else {
DB::table('GuildLog')->Insert([
[
'HWID' => $file['HWID_App_Log'],
'time' => Carbon::now(),
'IP' => $r->ip()
]
]);
}
}
}
你能帮助我吗?谢谢!
答案 0 :(得分:1)
该错误表示您在HWID_App
数组中没有$file
索引。
执行dd($file)
并在处理之前检查其兴奋程度。