| 1 |
<?php |
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
require("../../../dojo/tests/resources/JSON.php"); |
| 9 |
$json = new Services_JSON(); |
| 10 |
|
| 11 |
|
| 12 |
sleep(3); |
| 13 |
$name = empty($_REQUEST['name'])? "default" : $_REQUEST['name']; |
| 14 |
if(is_array($_FILES)){ |
| 15 |
$ar = array( |
| 16 |
|
| 17 |
|
| 18 |
'status' => "success", |
| 19 |
'name' => $name, |
| 20 |
'request' => $_REQUEST, |
| 21 |
'postvars' => $_POST, |
| 22 |
'details' => $_FILES, |
| 23 |
|
| 24 |
'foo' => array('foo'=>"bar") |
| 25 |
); |
| 26 |
|
| 27 |
}else{ |
| 28 |
$ar = array( |
| 29 |
'status' => "failed", |
| 30 |
'details' => "" |
| 31 |
); |
| 32 |
} |
| 33 |
|
| 34 |
|
| 35 |
$foo = $json->encode($ar); |
| 36 |
?> |
| 37 |
<textarea><?php print $foo; ?></textarea> |