i want publish my online calendar in iis manager 7..before this i create using phpmyadmin and notepad++..everything is okay..but now i need to change to oracle..i had try google and change oracle connection..after that, i put my files in iis..add mimetype, handler mapping, but i got same error which is 'Error getting json:json/json.php'..
Can someone help me?because im not familiar with json and oracle.. either my code is wrong or i need to make another setting in my pc..
Many thanks..
below is my json.php:-
header("Access-Control-Allow-Origin: *");
header("Content-Type: application/json; charset=UTF-8");
$DB = '//10.14.61.62:1521/XE';
$DB_USER = 'USERNAME';
$DB_PASS = 'password';
$con=oci_connect($DB, $DB_USER, $DB_PASS,)or die(oci_error());
oci_select_db("10.14.61.62:1521/JURISDB",$con);
$query = "SELECT * from USERNAME.events ";
$result = oci_query($query) or die(oci_error());
$arr =array();
while ($row = oci_fetch_assoc($result)) {
$arr[] = array(
"date" => $row["date"],
"title" => $row["title"],
"description" => $row["description"],
"url" => "",
);
}
echo json_encode($arr);
die();
?>
What I have tried:
i had add mimetype, handler mapping, setting in control panel..but still get some error..