Posted by Ike on 11/18/69 11:43
I am trying to run a pear module (JSON.php) without having Pear installed.
<?php
ini_set('include_path',ini_get('include_path').";C:\Program Files\Apache
Group\Apache2\htdocs"."\pear");
require('JSON.php');
$records=array();
$records[]=array('order'=>1, 'username'=>'joe');
$json=new JSON();
echo($json->encode($records));
?>
I have JSON.php in C:\Program Files\Apache Group\Apache2\htdocs\pear. I also
have unpacked the PEAR module phpUNIT there (required by JSON.php). However,
whenever I access this page, I get:
| |
Fatal error: Cannot instantiate non-existent class: json in C:\Program
Files\Apache Group\Apache2\htdocs\roomx1\getdata.php on line 7
Can someone please offer me a little direction here? Thanks, Ike
[Back to original message]
|