Click here to Skip to main content
15,888,454 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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:-


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..
Posted
Updated 17-Apr-16 23:39pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900