I have been working on a script that can be placed on any of our clients websites.
The way it works is:
on any of our customer's website pages they will have a reference (like the one below).
it calls the php script on my server which takes their request, processes it and provides a file ready to be read on my server. This file will be in multiple formats depending on how we have confirmed with the customer so it could be xml , html, csv etc.
document.getElementById("MyDivName").innerHTML = "<?=$CONTENTS?>";
Because the data stored in $CONTENTS can be any format and contain single and double quotes I am getting the 'unterminated string literal' on the above line.
Has anyone ever come across this issue and does anyone have any advice on how to actually take the contents of the file (stored on an external website) and displaying it?