Follow along with the video below to see how to install our site as a web app on your home screen.
Бележка: This feature may not be available in some browsers.
<form action="" method="post">
<input type="text" name="dir" value="dir">
<input type="text" name="chmod" value="chmod">
<input type="submit" name="button" value="Create">
</form>
<?php
if(isset($_POST['button']))
{
$dir = $_POST['dir'];
$chmod = $_POST['chmod'];
mkdir("$dir", $chmod);
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
</head>
<body>
<?php
if ($_POST['submit'])
{
$createFolder = $_POST['createFolder'];
$createNewFolder = mkdir($createFolder, 0700);
}
else{
?>
<form method="post" action="">
<input type="text" name="createFolder" /> <br />
<input type="submit" name="submit" value="ok" />
</form>
<?php } ?>
</body>
</html>
$dir = "./$dirs/";
$open = opendir($dir);
while($file = readdir($open)){
if("$file" !== "." and "$file" !== "..") echo "$file<br>";
}
$dir = $_SERVER['DOCUMENT_ROOT']."/".$dirs."/";
$open = opendir($dir);
while($file = readdir($open)){
if("$file" !== "." and "$file" !== "..") echo "$file<br>";
}
$dirs = "/mysite/";
Warning: opendir(./mysite/) [function.opendir]: failed to open dir: No error in D:\xampp\htdocs\mysite\index.php on line 43