Jetzt kostenlos Anmelden!

Sumale.nin

unregistriert

1

Freitag, 23. April 2010, 14:24

" Problem durch Php

Hallo,

folgendes habe ich in einer Datei stehen:

PHP-Quelltext

1
2
3
4
<?php
    $uc_coverpic ='usercover-bioshock-1.png';
    $uc_gameid ='44';
?>


Das möchte ich so ausgeben:

HTML

1
<td style="background-image:url(usercover/<?php echo $uc_gameid; ?>/<?php echo $uc_coverpic; ?>); background-repeat:no-repeat;">


Es wird aber nichts angezeigt, da der Code so ausgegeben wird:

Quellcode

1
<td style="background-image: url(&quot;usercover/44/usercover-bioshock-1.png&quot;); background-repeat: no-repeat;">


Was kann ich da machen?
  • Zum Seitenanfang
  • Zum Seitenende

-=LCL=-|BuLLeT| Männlich

#1.6.1 - still alive #

Beiträge: 1 319

Geschlecht: Männlich

Wohnort: Leipzig

PHPKIT Version: 1.6.1

2

Freitag, 23. April 2010, 17:34

anführungszeichen sind nicht zwingend notwendig zwischen den klammern. vllt gehts auch ohne diese
  • Zum Seitenanfang
  • Zum Seitenende

Sumale.nin

unregistriert

3

Freitag, 23. April 2010, 20:36

Auch wenn die nicht drin sind, kommen diese Umlaute "&quot;"

Hier mal die ganze Datei

Quellcode

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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
{header}
<?php
	$uc_user = 'Testuser';
	$uc_user_url ='http://url';
	$uc_usercoverid = '1337';
	$uc_covername ='Test';
	$uc_datum ='01.01.2010';
	$uc_filesize ='1337 KB';
	$uc_beschreibung ='<strong>Beschreibung</strong><ul><li>Test</li></ul>';
	$uc_coverpic ='usercover-bioshock-1.png';
	$uc_gameid ='44'; // Übergeordnetes Game füür welches das Cover ist
?>
<script type="text/javascript" src="{template_url}/js/externtooltip/addEvent.js"></script>
<script type="text/javascript" src="{template_url}/js/externtooltip/sweetTitles.js"></script>
<?php
function auslesenfiles($id)
            	{
            	$idvalue=FALSE;
            	$datei ="./admin/plugins/dlcounter/data/counter.txt";
            	if (file_exists($datei))
                           	{
                           	$file=file($datei);
            	$datei = fopen($datei, "r");
                           	foreach ($file as $line)
                                           	{
                                           	$exp_line = explode("|", $line);
                                           	if ($exp_line[0] == $id)
                                                           	{
                                           	$idvalue=TRUE;
                                           	$counter=$exp_line[1];
                                                           	$date=$exp_line[2];
                                                           	$time=$exp_line[3];
                                                           	fclose($datei);
                                                           	echo "$counter";
                                           	}
                                           	}
                                           	if ($idvalue==FALSE)
                                                           	{
                                                           	echo "0";
                                                           	}                         	
                           	}
            	else
                           	{
                           	echo "0";
                           	}
            	}
function auslesendatum($id)
            	{
            	$idvalue=FALSE;
            	$datei ="./admin/plugins/dlcounter/data/counter.txt";
            	if (file_exists($datei))
                           	{
                           	$file=file($datei);
            	$datei = fopen($datei, "r");
                           	foreach ($file as $line)
                                           	{
                                           	$exp_line = explode("|", $line);
                                           	if ($exp_line[0] == $id)
                                                           	{
                                           	$idvalue=TRUE;
                                           	$counter=$exp_line[1];
                                                           	$date=$exp_line[2];
                                                           	$time=$exp_line[3];
                                                           	fclose($datei);
                                                           	echo "Letzter: $date - $time Uhr";
                                           	}
                                           	}
                                           	if ($idvalue==FALSE)
                                                           	{
                                                           	echo "";
                                                           	}                         	
                           	}
            	else
                           	{
                           	echo "";
                           	}
            	}
?>
<!-- Start Top Container -->
<div id="top_container">
  <!-- Start Top Module -->
  <div id="top_module_container">
	<div id="top_module_container_inner">
  	<div id="users_top_container">
    	<div class="users_big_top_container">
      	<div class="moduletable">
        	<h3>Distanzierung</h3>
        	<div style="padding:5px;">
          	<table align="center">
            	<tr>Dieses Usercover wurde von dem User <strong><a href="<?php echo $uc_user_url;?>" title="Das Profil von <?php echo $uc_user;?> ansehen" target="_blank"><?php echo $uc_user;?></a></strong> Erstellt. Der User trägt die Volle Verantwortung für dieses Cover. Bei einer Verletzung diverser Markenrechte ist einzig und allein der User <strong><a href="<?php echo $uc_user_url;?>" title="Das Profil von <?php echo $uc_user;?> ansehen" target="_blank"><?php echo $uc_user;?></a></strong> zur Rechenschaft zu ziehen.</tr>
          	</table>
        	</div>
      	</div>
    	</div>
    	<div class="users_big_top_container">
      	<div class="moduletable">
        	<h3>Die Community wartet auf dein Cover!</h3>
        	<div style="padding:5px;"> Wir warten gespannt auf deine Cover. Du kannst uns diese in unserem <a href="http://forum.gamevote.net/board-32.html" title="Stelle dein Cover in unserem Forum ein" target="_blank"><strong>Forum</strong></a> vorstellen. Sei kreativ und eventuell schafft es dein Cover unter den Top8 der Usercover und wird im Portal zu sehen sein. </div>
      	</div>
    	</div>
  	</div>
	</div>
  </div>
  <!-- Ende Top Module -->
</div>
<!-- Ende Top Container-->
<!-- Start Content Container -->
<div id="content_outer">
  <!-- Start Breadcrumbs -->
  <div id="breadcrumbs">
	<div class="breadcrumbs no_shadow">&nbsp;&nbsp;Du befindest dich hier:&nbsp; <span class="breadcrumbs pathway">{clickstream}</span> </div>
  </div>
  <!-- Ende Breadcrumbs -->
  <!-- Start Content Float -->
  <div class="content_float">
	<!-- Start Content -->
	<div class="content_med">
  	<div id="main_content">
    	<div class="article-content">
      	<div class="details">
        	<table width="622" border="0">
          	<tr>
            	<td width="500"><div class="moduletable">
                	<h3><?php echo $uc_covername; ?></h3>
                	<div style="padding:5px;">
                  	<table id="dvd" width="368" border="0" cellpadding="0" cellspacing="0">
                    	<tr>
                      	<td colspan="3"><img src="{template_url}/img/dvd/bigdvd_oben.png" width="368" height="16" alt="" /></td>
                    	</tr>
                    	<tr>
                      	<td rowspan="2"><img src="{template_url}/img/dvd/bigdvd_left.png" width="51" height="449" alt="" /></td>
                      	<td style="background-image:url(usercover/<?php echo $uc_gameid; ?>/<?php echo $uc_coverpic; ?>); background-repeat:no-repeat;"><a href="#" title="So oder so ähnlich kann das Cover in deiner DVD- Hülle aussehen."><img src="{template_url}/img/dvd/bigdvd_deckel.png" alt="" width="300" height="426" border="0" /></a></td>
                      	<td rowspan="2"><img src="{template_url}/img/dvd/bigdvd_rechts.png" width="17" height="449" alt="" /></td>
                    	</tr>
                    	<tr>
                      	<td><img src="{template_url}/img/dvd/bigdvd_unten.png" width="300" height="23" alt="" /></td>
                    	</tr>
                  	</table>
                	</div>
              	</div></td>
            	<td width="10" ><br /></td>
            	<td width="100%" valign="top" ><div class="moduletable">
                	<h3>Details</h3>
                	<div style="padding:5px;">
                  	<table width="100%" border="0">
                    	<tr>
                      	<td colspan="2"><input
   type="button"
   name="download_button"
   class="button"
   value="Download"
   title="Normaler Download"
   onclick="location.href='admin/plugins/dlcounter/count.php?id=<?php echo $uc_usercoverid; ?>';"></td>
                    	</tr>
                    	<tr>
                      	<td width="33%" class="table_l"><b>Autor:</b></td>
                      	<td  class="table_r"><a href="<?php echo $uc_user_url;?>" title="Das Profil von <?php echo $uc_user;?> ansehen" target="_blank"><?php echo $uc_user;?></a></td>
                    	</tr>
                    	<tr>
                      	<td width="33%" class="table_l"><b>{lang_date}</b></td>
                      	<td class="table_r"><?php echo $uc_datum; ?></td>
                    	</tr>
                    	<tr>
                      	<td class="table_l"><b>{lang_file_size}</b></td>
                      	<td class="table_r"><?php echo $uc_filesize; ?></td>
                    	</tr>
                    	<tr>
                      	<td width="33%" class="table_l"><b>{lang_downloads}</b></td>
                      	<td class="table_r"><?php auslesenfiles($uc_usercoverid);?></td>
                    	</tr>
                    	<tr>
                      	<td colspan="2" align="right"><?php auslesendatum($uc_usercoverid);?></td>
                    	</tr>
                  	</table>
                	</div>
              	</div></td>
          	</tr>
        	</table>
        	<div class="moduletable">
          	<h3><b>{lang_description}</b></h3>
          	<div style="padding:5px;"  class="table_r"><?php echo $uc_beschreibung; ?></div>
        	</div>
      	</div>
    	</div>
  	</div>
	</div>
	<!-- Ende Content -->
	{if random_image}
	<!-- Start Left Module -->
	<div id="left_outer">
  	<div class="left_inner_float">
    	<div class="left_inner">
      	<div class="module_menu">
        	<div>
          	<div>
            	<div>
              	<h3>Zufalls Cover</h3>
              	<ul class="menu">
                	{random_images}
              	</ul>
            	</div>
          	</div>
        	</div>
      	</div>
    	</div>
  	</div>
	</div>
	<!-- Ende Left Module -->
	{endif random_image}
  </div>
  <!-- Ende Content Float -->
  <!-- Start Bottom Module -->
  <!-- Ende Bottom Module -->
</div>
<!-- Ende Content Container -->
<!-- Ende Component -->
{footer}
  • Zum Seitenanfang
  • Zum Seitenende

Dirk Kántor Männlich

aká Dooki

Beiträge: 2 064

Geschlecht: Männlich

PHPKIT Version: keine

4

Sonntag, 25. April 2010, 20:34

musst du die ausgaben wirklich alles mittels echo starten innerhalb deines templates da?!

funzt das mittels echo auch wirklich problemlos?!

gibts es andere möglichkeiten die variablen ausgeben zu lassen?
:thumbsup:    :thumbsup:       *tc*       :thumbsup:    :thumbsup:
8o           Achtung: Dirk Kántor ist unterwegs!           8o
Er verteilt gerne Verwarnungen ohne vorher darüber diskutiert zu haben.
php-gfx.net Archiv | Addon Room | Scripte | v/Root Server
  • Zum Seitenanfang
  • Zum Seitenende