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.
<?php
$file = htmlspecialchars($_GET['file']);
$razmer = filesize($file);
$open = fopen($file,"w+");
$text = fread($open , $razmer );
echo "<form method='post'>
<textarea name='edit' cols='30' rows='30'>$text</textarea>
<input type='submit' name='submit' value='edit'/>
</form>";
if(isset($_POST['submit'])) {
$text = $_POST['edit'];
$save = fwrite($open, $text);
echo "Файла е променен ;)";
}
fclose($file);
?>
<?php
$file = htmlspecialchars($_GET['file']);
$get = file_get_contents($file)or die('error1');
echo "<form method='post'>
<textarea name='edit' cols='100' rows='30'>$get</textarea>
<input type='submit' name='submit' value='edit'/>
</form>";
if(isset($_POST['submit'])) {
$text = $_POST['edit'];
$save = file_put_contents($file,$text)or die('error2');
if($save==true) {echo "Файла е променен ;)";}
}
?>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<form method="post">
<select name="openfile" onchange="this.form.submit();">
<option value="" > </option>
<?php
$file = htmlspecialchars($_GET['file']);
$directory = opendir('./'); //от коя директория да извежда файловете
while ($files = readdir($directory))
{
$file_array[] = $files;
}
foreach ($file_array as $files)
{
if($files == ".." || $files == ".")
{
continue;
} echo "<option value='$files'";if($file) { if($file==$files) {echo "selected";} } echo ">$files</option>";
}?>
</select>
</form>
<? if(isset($_POST['openfile'])) {$filess = htmlspecialchars($_POST['openfile']);echo "<META HTTP-EQUIV='Refresh' CONTENT='0; URL=?file=$filess'>";}
if($file) {
$get = file_get_contents($file)or die('error1');
echo "<form method='post'>
<textarea name='edit' cols='100' rows='30'>$get</textarea> <br>
<input type='submit' name='submit' value='Промени'/>
<input type='submit' name='del' value='Изтрий'/>
<a href='$file'>$file</a>
</form><br>";
if(isset($_POST['submit'])) {
$edit = $_POST['edit'];
$save = file_put_contents($file,$edit)or die('error2');
if($save==true) {echo "Файла е променен ;)";}
}
if(isset($_POST['del'])) {
$un = unlink($file);
if($un==true) {echo "Файла е изтрит <META HTTP-EQUIV='Refresh' CONTENT='0; URL=?file='>";}
}
}
if(!$file) {
echo "<form method='post'>
име на файла <input type='text' name='filenew'/><br>
<textarea name='new' cols='100' rows='30'>";
echo '
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>name</title>
</head>
<body>
</body>
</html>';
echo "</textarea> <br>
<input type='submit' name='submit1' value='Създай'/>
</form><br>";
if(isset($_POST['submit1'])) {
$filenew = htmlspecialchars($_POST['filenew']);
$new = $_POST['new'];
$save1 = file_put_contents($filenew,$new)or die('error3');
if($save1==true) {echo "Файла е създаден ;)";echo "<META HTTP-EQUIV='Refresh' CONTENT='1; URL=?file=$filenew'>";}
}
}
?>
Твоето ама знаеш ли как да махна това кадето слага / пред 'IzKuFeLiQqQqQ каза: