Soul_Stealler
Registered
Хрумнала ми е една идея за качване на файлове и правене на папки на сървър... (еми, като се чудя какво да правя, така става)
КАК ДА СИ НАПРАВИМ ПАПКА :lol: :
DEMO
КАК ДА СИ НАПРАВИМ ПАПКА :lol: :
Код:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<style type="text/css">
</style>
</head>
<body>
<?php
$ip = $_SERVER['REMOTE_ADDR'];
echo "<center>Welcome $ip to the free dir. making web site<hr></center>";
?>
<form method="post" action="make.php">
<input type="radio" name="make" value="make"> Направи папка с името <?php
$ip = $_SERVER['REMOTE_ADDR'];
echo "$ip";
?>
<br>
<input type="submit" value="Направи">
</form>
<?php
$make = $_POST['make'];
if (isset($make)){
echo "<span class=\"style1\">";
if (!(mkdir($ip))){
echo "</span>";
echo "Папка с име ($ip) вече съществува!";
} echo "<span class=\"style1\">";
if (mkdir($ip)){
echo "</span>";
echo "";
echo "Папка с име ($ip) е направена!";
}
}
echo "<span class=\"style1\">";
chmod($ip, 0777);
echo "</span>";
?>
</body>
</html>
DEMO