PHP cannot open local file when called from outside
I am using the WorldPay payment gateway on the website I am working on. It handles all the credit card credentials and then calls the PHP file on my server with the transaction information. It grabs the output from my script and displays it in chrome WorldPay.
I don't know the inner workings, but my guess is that they will use something similar to cURL to publish the transaction data to my script and then fetch the output.
My script writes the required information to an XML file, sends an email, and then thanks the customer for purchasing from us.
My problem is that when I test my file by calling it directly (disabling security checks and visiting
in my browser) everything works as planned, however when I go through the payment processor (this is how I assumed my script is being called via cURL), it doesn't work on this line:
$xml = simplexml_load_file('./info.xml');
Clarification: This line returns false which splits the following lines.
source to share