Get incident attachments in CP
Summary
Get incident attachments in CPContent
Hi All,
I am try to get the incident attachments using the connect PHP refer my below code but i get error, can any one please assist me to get the incident attachments
$incident = RNCPHP\Incident::fetch(6566);
// print_r($incident->FileAttachments[0]->URL);
$file_contents = file_get_contents($incident->FileAttachments[0]->URL);
print_r($file_contents);
// for ($i = 0; $i <= (count($incident->FileAttachments) - 1); $i++) {
// $url = $incident->FileAttachments[$i]->getAdminURL();
// }
Error
Fatal error: Access to file_get_contents is denied because its trying to access restricted folders in /cp/customer/development/controllers/AjaxCustom.php
Tagged:
1