כשלוחצים על עדכן: הוא עושה את השגיאות הבאות
PHP קוד:
<!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" dir="rtl">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1255" />
<link rel="stylesheet" type="text/css" href="style.css" />
<title>Zvaim :: CMS</title>
</head>
<body>
<div class="wrep">
<div id="header">
<img src="images/bar.png" width="900" height="130" alt="" />
<div id="menu">
<div class="menu_text">
<a href="index.html">דף ראשי</a>
<br />
<a href="edit.php">עריכת דפים</a>
<br />
<a href="edit.php">עריכת חבילות</a>
</div>
</div>
</div>
<div id="tail_right">
<div class="title_text" style="margin-right: -22px;">
<?php
// -- DO NOT TOUCH THIS!! THIS PART UPDATING TITLE.PHP
if (isset($_POST['submit'])) {
$file = "title.php";
$open = fopen($file, 'w');
fwrite($open, " ".$_POST['title']."\r\n");
fclose($open);
$file = "text.php";
$open = fopen($file, 'w');
fwrite($open, " ".$_POST['text']."\r\n");
fclose($open);
}
?>
<script type="text/javascript" src="/zvaimnew/fckeditor/fckeditor.js"></script>
<script type="text/javascript">
window.onload = function()
{
// Automatically calculates the editor base path based on the _samples directory.
// This is usefull only for these samples. A real application should use something like this:
BasePath = '/zvaimnew/fckeditor/' ; // '/fckeditor/' is the default value.
var oFCKeditorText = new FCKeditor( 'text' ) ;
oFCKeditorText.BasePath = BasePath;
oFCKeditorText.Width = "573";
oFCKeditorText.Height = "300";
oFCKeditorText.ReplaceTextarea() ;
/*var oFCKeditorTitle = new FCKeditor( 'title' ) ;
oFCKeditorTitle.BasePath = BasePath;
oFCKeditorTitle.ReplaceTextarea() ;*/
}
</script>
</head>
<body>
<form name="update" method="post" action="">
<br />
<b>עריכת עמוד 'אודות':</b>
<br />
<textarea cols="70" rows="15" name="text">
<?php
echo htmlspecialchars(file_get_contents("text.php"));
?>
</textarea>
<br />
<input type="submit" name="submit" value="עדכן דף > >" />
<br />
<br />
<b>עריכת כותרת 'Title':</b>
<br />
<textarea cols="23" rows="2" name="title">
<?php
echo htmlspecialchars(file_get_contents("title.php"));
?>
</textarea>
<br />
<input type="submit" name="submit" value="עדכן כותרת > >" />
</form>
</div>
</div>
</div>
</body>
</html>
PHP קוד:
Warning: fopen(title.php) [function.fopen]: failed to open stream: Permission denied in /home/zvaim/domains/zvaim.co.il/public_html/zvaimnew/zvaimcms/edit.php on line 31
Warning: fwrite(): supplied argument is not a valid stream resource in /home/zvaim/domains/zvaim.co.il/public_html/zvaimnew/zvaimcms/edit.php on line 32
Warning: fclose(): supplied argument is not a valid stream resource in /home/zvaim/domains/zvaim.co.il/public_html/zvaimnew/zvaimcms/edit.php on line 33
Warning: fopen(text.php) [function.fopen]: failed to open stream: Permission denied in /home/zvaim/domains/zvaim.co.il/public_html/zvaimnew/zvaimcms/edit.php on line 37
Warning: fwrite(): supplied argument is not a valid stream resource in /home/zvaim/domains/zvaim.co.il/public_html/zvaimnew/zvaimcms/edit.php on line 38
Warning: fclose(): supplied argument is not a valid stream resource in /home/zvaim/domains/zvaim.co.il/public_html/zvaimnew/zvaimcms/edit.php on line 39