Possible Duplicate:
Why files don’t get uploaded with this HTML/PHP?
i'm using Slim Framework to make a REST web service to do a simple service:
require 'Slim/Slim.php';
$app = new Slim();
$app->get('/update','showUpdatePage');
$app->post('/update','store');
$app->run();
function store(){
print_r($_FILES);
}
function showUpdatePage(){
echo <<<EOT
<html>
<body>
<h2 style="text-align:center;">Load new file</h2>
<div style="width:40%;margin:0 auto;">
<form method="post" action="update">
<input type="file" name="theFile" enctype="multipart/form-data" />
<input type="submit" value="load"/>
</form>
</div>
</body>
</html>
EOT;
}
My problem is that the line
print_r($_FILES);
give me empty array.. how can i fix?