Skip to content

Instantly share code, notes, and snippets.

@IsaacGonzalez
Last active August 29, 2015 14:07
Show Gist options
  • Save IsaacGonzalez/4f108dff9977d3d1f2c8 to your computer and use it in GitHub Desktop.
Save IsaacGonzalez/4f108dff9977d3d1f2c8 to your computer and use it in GitHub Desktop.
<?php
// localhost/multipart_tet
var $response = array();
// Agarramos el archivo
var $foto = $_FILES["file"]
// Vemos cuales headers son los que están llegando
var $headers = apache_request_headers();
foreach ($headers as $header => $value) {
$response[] = array($header,$value)
}
$response[] = array("Nombre_Archivo", $foto["name"] )
move_uploaded_file($foto, "uploads/".$foto["name"]);
echo json_encode(response)
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment