הרשם שאלות ותשובות רשימת חברים לוח שנה הודעות מהיום

חזור   הוסטס - פורום אחסון האתרים הגדול בישראל > עיצוב גראפי, תכנות על כל שפותיו וקידום ושיווק אתרים > פורום תיכנות

   
|!|

השב
 
כלים לאשכול תצורת הצגה
ישן 26-08-08, 15:54   # 1
Avi Salama
חבר מתקדם
 
מיני פרופיל
תאריך הצטרפות: Sep 2007
הודעות: 353

Avi Salama לא מחובר  

בעיה כלשהי בפונקצייתFOPEN

שלום לכולם, יש לי את הבא שעורך חלק כלשהו באתר שלי והבעיה היא שמה שאני כותב בעריכת תוכן של העמוד 'אודות' הוא כותב אותו דבר גם בתיבת טקסט של ה TITLE וזה אמור להיות שכל טקסט יהיה שונה אחד מהשני.. מה הבעיה פה בקוד?
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>מערכת ניהול תוכן</title>
</head>
<body>
<div align="center">
<form name="update" method="post" action="">
<br />
<b>עריכת עמוד 'אודות':</b>
<br />
<?php
// -- DO NOT TOUCH THIS!! THIS PART UPDATING TEXT.PHP
if (isset($_POST['submit'])) {
$file "text.php";
$open fopen($file'w');
fwrite($open" ".$_POST['update']."\r\n");
fclose($open);
}
?>

<textarea cols="70" rows="15" name="update">
<?php
include('text.php');
?>
</textarea>
<br />
<input type="submit" name="submit" value="עדכן דף > >" />
</form>


<br />


<form name="update2" method="post" action="">
<br />
<b>עריכת כותרת 'Title':</b>
<br />
<?php
// -- DO NOT TOUCH THIS!! THIS PART UPDATING TITLE.PHP
if (isset($_POST['submit'])) {
$file "title.php";
$open fopen($file'w');
fwrite($open" ".$_POST['update2']."\r\n");
fclose($open);
}
?>

<textarea cols="23" rows="2" name="update2">
<?php
include('title.php');
?>
</textarea>
<br />
<input type="submit" name="submit" value="עדכן כותרת > >" />
</form>


תודה רבה (:
__________________
בברכה - אבי,
מסנג'ר: avi1_2_1@walla.com
  Reply With Quote
ישן 26-08-08, 16:30   # 2
Gal Shafrir
חבר וותיק
 
מיני פרופיל
תאריך הצטרפות: Oct 2005
הודעות: 1,626

Gal Shafrir לא מחובר  

תנסה לקרוא למשל למשתנים של הtitle בצורה שונה למשל במקום file שיהיה file_title וכו'
אני מניח שזו הבעיה...
__________________
בברכה,
גל שפריר - מעצב ומפתח אתרים.

עופר שפריר - במאי, תסריטאי ומפיק.
  Reply With Quote
ישן 26-08-08, 19:06   # 3
Avi Salama
חבר מתקדם
 
מיני פרופיל
תאריך הצטרפות: Sep 2007
הודעות: 353

Avi Salama לא מחובר  

כשלוחצים על עדכן: הוא עושה את השגיאות הבאות


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 קוד:
Warningfopen(title.php) [function.fopen]: failed to open streamPermission 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 streamPermission 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 
__________________
בברכה - אבי,
מסנג'ר: avi1_2_1@walla.com
  Reply With Quote
השב

חברים פעילים הצופים באשכול זה: 1 (0 חברים ו- 1 אורחים)
 


חוקי פירסום
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is מופעל
סמיילים הם מופעל
[IMG] קוד מופעל
קוד HTML מכובה

קפיצה לפורום


כל הזמנים הם GMT +2. הזמן כעת הוא 08:45.

מופעל באמצעות VBulletin גרסה 3.8.6
כל הזכויות שמורות ©
כל הזכויות שמורות לסולל יבוא ורשתות (1997) בע"מ