You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Get incident attachments in CP

Accepted answer
34
Views
7
Comments
edited Aug 22, 2019 9:53AM in Customer Portal 7 comments

Summary

Get incident attachments in CP

Content

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

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!