Skythrust
Member
- Jul 9, 2019
- 133
- 7
Hi Guys,
I am trying to read a connection string (made in c# (at C:\ProgramData)) inside PHP, but without success.
Any idea what the problem could be?
Code;
I am trying to read a connection string (made in c# (at C:\ProgramData)) inside PHP, but without success.
Any idea what the problem could be?
Code;
PHP:
$xmldata = simplexml_load_file("C:\ProgramData\ID\Config\Config.xml") or die("Failed to load");
echo $xmldata->DatabaseConnection[0]->DataSource;
echo $xmldata->DatabaseSettings[0]->LicenseKey;
XML:
<?xml version="1.0" encoding="utf-8"?><Config><DatabaseConnection DataSource="SQLSERVER" InitialCatalog="DATABASE" UserID="UID" Password="PWD" />