<!DOCTYPE HTML>
<!--
	Photon by HTML5 UP
	html5up.net | @ajlkn
	Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
-->
<html>
	<head>
		<title>K8S cluster de C.Rey</title>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
		<link rel="stylesheet" href="assets/css/main.css" />
		<noscript><link rel="stylesheet" href="assets/css/noscript.css" /></noscript>
	</head>
	<body class="is-preload">

		<!-- Header -->
			<section id="header">
				<div class="inner">

<?php

	echo '<span class="icon solid major fa-cloud"></span>';
	/* Comrpueba si el directorio tiene permisos de escritura */

	//$upload_dir = $_SERVER['DOCUMENT_ROOT'] . "/musica/";
	$upload_dir = $_SERVER['DOCUMENT_ROOT'];

	if (is_dir($upload_dir) && is_writable($upload_dir)) {
	    // do upload logic here
	    echo '<p>El directorio '.$upload_dir.' tiene permisos de escritura<p>';
	} else {
	    echo '<p>El directorio '.$upload_dir.' NO tiene permisos de escritura (o no existe)<p>';
	}

	/* coge el nombre del fichero subido */

	$filename = $_FILES['file']['name'];

	/* Elige un lugar donde salvarlo */

	//$location = __DIR__."/musica/".$filename;
	//$location = __DIR__."/musica/luisa.mp3";
	$location = __DIR__."/luisa.mp3";

	/* Salva el fichero en la ubicación */
	if( move_uploaded_file($_FILES['file']['tmp_name'], $location)) {
		echo '<h1>Fichero subido correctamente</h1>';
	} else {
		echo '<br><b>Ha habido algún error</b> #: '.$_FILES['file']['error'];
		echo '<br>El fichero es: '.$_FILES['file']['name'].' para guardar en '.$location;
	}

?>

			<ul class="actions special">
				<li><a href="http://reymota.ddns.net:30080" class="button scrolly">Volver</a></li>
			</ul>
		</div>
	</section>

	</section>

	</div>
	</section>
		-->
		<!-- Footer -->
			<section id="footer">
				<ul class="icons">
					<li><a href="#" class="icon brands alt fa-twitter"><span class="label">Twitter</span></a></li>
					<li><a href="#" class="icon brands alt fa-facebook-f"><span class="label">Facebook</span></a></li>
					<li><a href="#" class="icon brands alt fa-instagram"><span class="label">Instagram</span></a></li>
					<li><a href="#" class="icon brands alt fa-github"><span class="label">GitHub</span></a></li>
					<li><a href="#" class="icon solid alt fa-envelope"><span class="label">Email</span></a></li>
				</ul>
				<ul class="copyright">
					<li>&copy; Untitled</li><li>Design: <a href="http://html5up.net">HTML5 UP</a></li>
				</ul>
			</section>

		<!-- Scripts -->
			<script src="assets/js/jquery.min.js"></script>
			<script src="assets/js/jquery.scrolly.min.js"></script>
			<script src="assets/js/browser.min.js"></script>
			<script src="assets/js/breakpoints.min.js"></script>
			<script src="assets/js/util.js"></script>
			<script src="assets/js/main.js"></script>

	</body>
</html>
