When I have simple calls functions in PHP (such as file_exists() and others) from Javascript, it works:
console.log("<?php echo file_exists('img.png');?>");
But when involving quotes, it fails.
s='img.png';
console.log("<?php echo file_exists('"+s+"');?>");
How should I escape this to making the last line work?