Created
July 16, 2009 07:19
-
-
Save jawngee/148298 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
class SomeController extends Controller | |
{ | |
// Upload an xml file and parse it | |
public function post_index() | |
{ | |
foreach($this->request->files as $name => $file) | |
{ | |
// moves to app's temp directory | |
$file->move(); | |
if ($file->type=='text/xml') | |
{ | |
$xml=$file->contents(); | |
// parse $xml | |
} | |
// delete the file | |
$file->delete(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment