PHP通过PHP/JAVA Bridge调用JasperReport报表(2)
18 {
19 return "java extension not installed.";
20 }
21 }
22 else
23 {
24 if(!(@include_once("java/Java.inc")))
25 {
26
27 require_once("http://127.0.0.1:$port/JavaBridge/java/Java.inc");
28 }
29 }
30 }
31 if(!function_exists("java_get_server_name"))
32 {
33 return "The loaded java extension is not the PHP/Java Bridge";
34 }
35
36 return true;
37 }
38
39 /**
40 * convert a php value to a java one...
41 * @param string $value
42 * @param string $className
43 * @returns boolean success
44 */
45 function convertValue($value, $className)
46 {
47 // if we are a string, just use the normal conversion
48 // methods from the java extension...
49 try
50 {
51 if ($className == 'java.lang.String')
52 {
53 $temp = new Java('java.lang.String', $value);
54 return $temp;
55 }
56 else if ($className == 'java.lang.Boolean' ||
57 $className == 'java.lang.Integer' ||
相关新闻>>
- 发表评论
-
- 最新评论 更多>>