|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
MoR4euZ Smarty Rookie
Joined: 30 Jun 2004 Posts: 5
|
Posted: Wed Jun 30, 2004 3:56 pm Post subject: {include_php file="xyz.php"} = Smarty.class.php on |
|
|
hallo forum
es geht um meine versuche php scripte zu includen
siehe: http://web5.208080.vserver.de/
die chmods sind erstmal alle auf 777
ich verwende
http://www.content-builder.de
in der smarty doku steht das die php scripte im $trusted_dir dir liegen müssen
wo finde ich das ?
oder wie lege ich es an ?
in meiner smarty.class steht nur
var $trusted_dir = array();
drin
wen ich
{php}include("xyz.php");{/php}
verwende kommt folgende fehler meldung:
opendir(http://web5.208080.vserver.de/modules/katalog/images): failed to open dir: not implemented in /var/www/web5/html/modules/katalog/katalog.php on line 4
Warning: readdir(): supplied argument is not a valid Directory resource in /var/www/web5/html/modules/katalog/katalog.php on line 5
bin für jede hilfestellung dankbar
gruss
MoR4euZ |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Wed Jun 30, 2004 5:36 pm Post subject: |
|
|
content-builder kenn ich nich.
trusted_dir brauchst du nur, wenn security enabled ist.
es scheint du versuchst das file über "http://.." einzubinden, versuchs mal mit 'nem lokalen pfad. ("/var/www/web5/html/xyz.php" o.ä.) |
|
Back to top |
|
MoR4euZ Smarty Rookie
Joined: 30 Jun 2004 Posts: 5
|
Posted: Wed Jun 30, 2004 6:53 pm Post subject: |
|
|
jo damit hab ich noch garnet probiert
fehlermeldungen sind nu weg
aber nu kann er das bild nicht finden
ich fummel mal weiter
aso es geht um das script
[php:1:b70027d26e]
<?php
$vn = "/var/www/web5/html/templates/default/images/menu_right";
$verzeichnis = opendir($vn);
while($file = readdir($verzeichnis)) {
$s = @getimagesize($vn."/".$file);
if(in_array($s[2], array(1,2,3)))
$auswahl[] = $file;
}
mt_srand((double)microtime()*1000000);
$number = mt_rand(0,count($auswahl)-1);
echo "<img src='".$vn."/".$auswahl[$number]."'>";
?>
[/php:1:b70027d26e]
es soll sich aus einem verzeichnis bilder ziehen ohne das man diese irgentwo namentlich festhalten muss |
|
Back to top |
|
kills Smarty Elite
Joined: 28 May 2004 Posts: 493
|
Posted: Thu Jul 01, 2004 6:59 am Post subject: |
|
|
du musst die source des bildes relativ zum aufgerufen script aufrufen.
wenn im src beim client folgendes ankommt
Code: |
<img src="var/www/...../img/1.gif">
|
dann muss das bild auch lokal auf dem client unter diesem ordner zu finden sein.
du musst entweder das bild absolute per url angeben o. wie oben genannt. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|