php in html wird nicht convertiert

Madd Eye
Also hier ist mein code:

code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1"/>
<link rel="stylesheet" type="text/css" href="default.css" media="screen"/>
<title>One Piece Lexikon</title>

</head>

<body>

<div class="wrapper">

	<div class="container">

		<div class="main">		
			
			<div class="content">

				<div class="title">One Piece Lexikon</div>
				<p class="olive">Was man eben Wissen muss</p>

				<h2>Was ist der AMV CONTEST?</h2>

				<p>Der Amv Contest ist ein Veranstaltung die auf http://onepiece-animeworld.de regelmäsig durchgeführt wird. Bei diesem Contest geht es darum eine Bestimmte Aufgabe in Form eines AMV's zu lösen. Hier werden nun die Aktuellen Ergebnisse dargestellt. Wie siehts aus? Mach doch mal mit, denn jeder kann teilnehemen. Einfach Anmelden, Cuten, Gewinnen.</p>

        <h2>Das Ergebniss des Letzten AMV CONTESTES</h2>
        <div class="center">
        <p>                     Gewinner des 1. OPAW AMV-Contest "The First"</p>
                  <p>                             Robinchen</p>
                  <p>                            mit dem AMV</p>
                  <p>                        "One Piece - Memories "</p>
                  <blockquote><p>(gewonnen mit 147,5 Pkt)</p></blockquote>
          
          <p>Das Gewinner Video</p>
          
          <object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='464' height='380' id='player' align='middle'><param name='allowScriptAccess' value='always' /><param name='movie' value='http://www.clipfish.de/videoplayer.swf?as=0&vid=2362639&r=1' /><param name='quality' value='high' /><param name='bgcolor' value='#FF0000' /><param name='allowFullScreen' value='true' /><embed src='http://www.clipfish.de/videoplayer.swf?as=0&videoid=NDQ2MzQwfDIzNjI2Mzk%3D&r=1' quality='high' bgcolor='#FF0000' width='464' height='380' name='player' align='middle' allowFullScreen='true' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'></embed></object><a href='http://www.clipfish.de/index.php?utm_source=ext_player&utm_medium=ext_player_textlink&utm_campaign=cf' title='Lustige Videos – Gratis Fun Video – Deine funny Videos bei Clipfish' style='display:block;margin-left:45px;margin-top:3px;color:#0099CC;cursor:pointer;font-family:verdana,geneva,arial,helvetica,sans-serif;font-size:10px;font-size-adjust:none;font-stretch:normal;font-style:normal;font-variant:normal;font-weight:bold;line-height:normal;text-decoration:underline;'>Lustige Videos – Gratis Fun Video – Deine funny Videos bei Clipfish</a>
        </div>
			
      <h2>Bewertungen</h2>
      <p>Jetzt seit ihr Gefragt. Was haltet ihr von unserem Gewinner?</p>
  
        <?php
          $rater_id=1;
          $rater_item_name='Item_1';
          include("rater.php");
        ?>

      
      </div>

			<div class="sidenav">

				<h2>One Piece Lexikon</h2>
				<ul>
					<li><a href="index.html">Home</a></li>
					<li><a href="about.html">Über Uns</a></li>
					<li><a href="partner.html">Partner</a></li>
					<li><a href="amvcontest.html">AMV Contest</a></li>
					<li><a href="http://www.onepiece-animeworld.de">Forum</a></li>
				</ul>

				<h2>Lexikon</h2>
				<ul>
					<li><a href="character.html">Charakter</a></li>
					<li><a href="teufelsfruechte.html">Teufelsfrüchte</a></li>
					<li><a href="epoguid.html">Episoden Guid</a></li>
					<li><a href="history.html">Vorgeschichte von One Piece</a></li>
				</ul>


			</div>

			<div class="clearer"></div>

		</div>

		<div class="footer">

			<div class="left">&copy; 2008 <a href="http://onepiece-animeworld.de">onepiece-animeworld.de</a>.</div>
		
			<div class="right">Design by <a href="http://arcsin.se/">Arcsin</a> <a href="http://templates.arcsin.se/">Web Templates</a></div>

			<div class="clearer"><span></span></div>

		</div>

	</div>

</div>

</body>

</html>


Nun müsste man eigentnlich an dieser stelle Sterne sehen können zum Raten aber da sind keine Warum? Kann es sein das PHP nicht angenommen wird?
Häfner
Hast du es auch als PHP-Datei abgespeichert?

Also als datei.php und nicht als datei.html
Madd Eye
ja sie ist gespeichert unter "rater.php"

inhalt:

php:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
<?

// User settings
$rater_ip_voting_restriction false// restrict ip address voting (true or false)
$rater_ip_vote_qty=1000// how many times an ip address can vote
$rater_already_rated_msg="Du hast schonmal eine Bewertung abgegeben!".$rater_ip_vote_qty." vote(s).";
$rater_not_selected_msg="Du hast kein Rating abgegeben";
$rater_thankyou_msg="Danke fürs Bewerten";
$rater_generic_text="this item"// generic item text
$rater_end_of_line_char="\n"// may want to change for different operating systems



if(!isset($rater_id)) $rater_id=1;
if(!isset($rater_item_name)) $rater_item_name=$rater_generic_text;


// DO NOT MODIFY BELOW THIS LINE
$rater_filename='item_'.$rater_id.".rating";
$rater_rating=0;
$rater_stars="";
$rater_stars_txt="";
$rater_rating=0;
$rater_votes=0;
$rater_msg="";

// Rating action
if(isset($_REQUEST["rate".$rater_id])){
 if(isset($_REQUEST["rating_".$rater_id])){
  while(list($key,$val)=each($_REQUEST["rating_".$rater_id])){
   $rater_rating=$val;
  }
  $rater_ip getenv("REMOTE_ADDR"); 
  $rater_file=fopen($rater_filename,"a+");
  $rater_str="";
  $rater_str rtrim(fread($rater_file1024*8),$rater_end_of_line_char);
  if($rater_str!=""){
   if($rater_ip_voting_restriction){
    $rater_data=explode($rater_end_of_line_char,$rater_str);
    $rater_ip_vote_count=0;
    foreach($rater_data as $d){
     $rater_tmp=explode("|",$d);
     $rater_oldip=str_replace($rater_end_of_line_char,"",$rater_tmp[1]);
     if($rater_ip==$rater_oldip){
      $rater_ip_vote_count++;
     }
    }
    if($rater_ip_vote_count > ($rater_ip_vote_qty 1)){
     $rater_msg=$rater_already_rated_msg;
    }else{
     fwrite($rater_file,$rater_rating."|".$rater_ip.$rater_end_of_line_char);
     $rater_msg=$rater_thankyou_msg;
    }
   }else{
    fwrite($rater_file,$rater_rating."|".$rater_ip.$rater_end_of_line_char);
    $rater_msg=$rater_thankyou_msg;
   }
  }else{
   fwrite($rater_file,$rater_rating."|".$rater_ip.$rater_end_of_line_char);
   $rater_msg=$rater_thankyou_msg;
  }
  fclose($rater_file);
 }else{
  $rater_msg=$rater_not_selected_msg;
 }
}

// Get current rating
if(is_file($rater_filename)){
 $rater_file=fopen($rater_filename,"r");
 $rater_str="";
 $rater_str fread($rater_file1024*8);
 if($rater_str!=""){
  $rater_data=explode($rater_end_of_line_char,$rater_str);
  $rater_votes=count($rater_data)-1;
  $rater_sum=0;
  foreach($rater_data as $d){
   $d=explode("|",$d);
   $rater_sum+=$d[0];
  }
  $rater_rating=number_format(($rater_sum/$rater_votes), 2'.''');
 }
 fclose($rater_file);
}else{
 $rater_file=fopen($rater_filename,"w");
 fclose($rater_file);
}

// Assign star image
if ($rater_rating <= 0  ){$rater_stars "./img/00star.gif";$rater_stars_txt="Not Rated";}
if ($rater_rating >= 0.5){$rater_stars "./img/05star.gif";$rater_stars_txt="0.5";}
if ($rater_rating >= 1  ){$rater_stars "./img/1star.gif";$rater_stars_txt="1";}
if ($rater_rating >= 1.5){$rater_stars "./img/15star.gif";$rater_stars_txt="1.5";}
if ($rater_rating >= 2  ){$rater_stars "./img/2star.gif";$rater_stars_txt="2";}
if ($rater_rating >= 2.5){$rater_stars "./img/25star.gif";$rater_stars_txt="2.5";}
if ($rater_rating >= 3  ){$rater_stars "./img/3star.gif";$rater_stars_txt="3";}
if ($rater_rating >= 3.5){$rater_stars "./img/35star.gif";$rater_stars_txt="3.5";}
if ($rater_rating >= 4  ){$rater_stars "./img/4star.gif";$rater_stars_txt="4";}
if ($rater_rating >= 4.5){$rater_stars "./img/45star.gif";$rater_stars_txt="4.5";}
if ($rater_rating >= 5  ){$rater_stars "./img/5star.gif";$rater_stars_txt="5";}


// Output
echo '<div class="hreview">';
echo '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
echo '<h3 class="item">Rate <span class="fn">'.$rater_item_name.'</span></h3>';
echo '<div>';
echo '<span  class="rating"><img src="'.$rater_stars.'?x='.uniqid((double)microtime()*1000000,1).'" alt="'.$rater_stars_txt.' stars" /> Ave. rating: '.$rater_stars_txt.'</span> from <span class="reviewcount"> '.$rater_votes.' votes</span>.';
echo '</div>';
echo '<div>';
echo '<label for="rate5_'.$rater_id.'"><input type="radio" value="5" name="rating_'.$rater_id.'[]" id="rate5_'.$rater_id.'" />Excellent</label>';
echo '<label for="rate4_'.$rater_id.'"><input type="radio" value="4" name="rating_'.$rater_id.'[]" id="rate4_'.$rater_id.'" />Very Good</label>';
echo '<label for="rate3_'.$rater_id.'"><input type="radio" value="3" name="rating_'.$rater_id.'[]" id="rate3_'.$rater_id.'" />Good</label>';
echo '<label for="rate2_'.$rater_id.'"><input type="radio" value="2" name="rating_'.$rater_id.'[]" id="rate2_'.$rater_id.'" />Fair</label>';
echo '<label for="rate1_'.$rater_id.'"><input type="radio" value="1" name="rating_'.$rater_id.'[]" id="rate1_'.$rater_id.'" />Poor</label>';
echo '<input type="hidden" name="rs_id" value="'.$rater_id.'" />';
echo '<input type="submit" name="rate'.$rater_id.'" value="Rate" />';
echo '</div>';
if($rater_msg!="") echo "<div>".$rater_msg."</div>";
echo '</form>';
echo '</div>';

?>

Biggi
Was NeXoR meinte ist, ob du die Datei aus deinem ersten Post als PHP abgespeichert hast.
Sobald auch nur ein Fitzel PHP-Code in einer HTML-Datei drin steht, muß sie mit der Endung .php gespeichert werden.
ENTE
PHP-Interpreter aktiv?
Madd Eye
Achso ich hab Nexor nur falsch verstanden ich hab die Datei unter html gespeichert

Danke leute ^^
Häfner
Hehe! Gerne, immer wieder! Zunge raus