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.
<?
$myFile = "test.php";
unlink($myFile);
echo "iztrit";
?>
<form method="post" action="action.php">
<input type="text" name="filename" value="File name"> <br>
<textarea name="theText" cols="35" rows="15">File data </textarea> <br>
<input type="submit" value="Post Data">
</form>
action.php
<?
$filename = $_POST["filename"];
$theText = $_POST["theText"];
$theText = stripslashes($theText);
$data = fopen($filename, "a");
fwrite($data,$theText);
fclose($data);
echo "File created or updated";
?>
MakeAWish каза:Код:<?php $fopen = fopen('file.php', 'w'); fclose($fopen); ?>
Отваряш файл file.php за запис, но не въвеждаш нищо, т.е. се получава, че затриваш цялото съдържание без да въвеждаш ново. Резултат - имаш празен файл
ПП. Ако не съществува такъв файл ще го създаде.