Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

{include_php file="xyz.php"} = Smarty.class.php on

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: German
View previous topic :: View next topic  
Author Message
MoR4euZ
Smarty Rookie


Joined: 30 Jun 2004
Posts: 5

PostPosted: Wed Jun 30, 2004 3:56 pm    Post subject: {include_php file="xyz.php"} = Smarty.class.php on Reply with quote

hallo forum

es geht um meine versuche php scripte zu includen

siehe: http://web5.208080.vserver.de/

die chmods sind erstmal alle auf 777 Wink

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
View user's profile Send private message Visit poster's website
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Wed Jun 30, 2004 5:36 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
MoR4euZ
Smarty Rookie


Joined: 30 Jun 2004
Posts: 5

PostPosted: Wed Jun 30, 2004 6:53 pm    Post subject: Reply with quote

jo damit hab ich noch garnet probiert
fehlermeldungen sind nu weg
aber nu kann er das bild nicht finden Smile

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
View user's profile Send private message Visit poster's website
kills
Smarty Elite


Joined: 28 May 2004
Posts: 493

PostPosted: Thu Jul 01, 2004 6:59 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: German All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP