<?php
session_start();

$upFile = $_FILES['test'];

// アップロード処理
$path	= '/usr/local/apache2/vhdocs/html/www.iwl.world/system/documents/test/856/';

$upPath = $path . 'ttttt';
if(!file_exists($upPath)) {
	mkdir($upPath);
}

if(!file_exists($upPath . '/' . $upFile['name'])) {
	move_uploaded_file($upFile['tmp_name'], $upPath . '/' . $upFile['name']);
}

foreach(glob($upPath . '/*') as $files) {
	echo '<br/>' . $files . '<br/>';
}
?>

<!DOCTYPE html>
<html lang="ja">
	<head>
	  <meta charset="utf-8">
	</head>
	<body>
		アップロード完了
	</body>
</html>
