Subversion Repositories Applications.papyrus

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2150 mathias 1
<?php
2
 
3
// THIS IS AN EXAMPLE
4
// you will obviously need to do more server side work than I am doing here to check and move your upload.
5
// API is up for discussion, jump on http://dojotoolkit.org/forums
6
 
7
// JSON.php is available in dojo svn checkout
8
require("../../../dojo/tests/resources/JSON.php");
9
$json = new Services_JSON();
10
 
11
// fake delay
12
sleep(3);
13
$name = empty($_REQUEST['name'])? "default" : $_REQUEST['name'];
14
if(is_array($_FILES)){
15
	$ar = array(
16
		'status' => "success",
17
		'details' => $_FILES[$name]
18
	);
19
}else{
20
	$ar = array(
21
		'status' => "failed",
22
		'details' => ""
23
	);
24
}
25
 
26
// yeah, seems you have to wrap iframeIO stuff in textareas?
27
$foo = $json->encode($ar);
28
?>
29
<textarea><?php print $foo; ?></textarea>