PHP – Скрипт за писане на новини
Като за начало си създайте един файл save.txt
fsave.php
<html><head></head></body><form name="save" method="post" action="save.php">
<textarea name="teksta">
<? include "save.txt"; ?>
</textarea> <BR>
<input type=submit value="zapametti">
</form>
</body</html>save.php
<?
$newr = fopen("save.txt","w+");
fwrite($newr, $_REQUEST["teksta"]);
?>news.php
<?php
$filename = 'save.txt';
$fp = fopen($filename, "r");
$string = fread($fp,filesize($filename));
fclose($fp);
echo $string;
?>Това се поставя в idex-а
<p>
<object id="News" type="text/html" data="news.php" width="400" height="100"></object>
</p>Отваряте fsave.php пишете новината вътре и сте готови
Урока е изготвен от d3v!L


