
Originally Posted by
keyboard
If you want to use something other than newlines as dividers change this line -
Just replace "\n" with whatever you want to use as a divider instead. (\n is the symbol for newline)
thank you very much... just another question. same script includes img with code below. I wish to make $verzeichnis = "img/thumbs/"; relative to server root path. I tried different ways with $_SERVER['DOCUMENT_ROOT but no one works. Is it possible to do this?
Code:
<?php
$verzeichnis = "img/thumbs/";
$bildtyp = array("gif","jpg","png","bmp");
$quelle = dir($verzeichnis);
$bildname = array();
$link_target = ('_parent') ;
$linkrel = ('nofollow') ;
while($datei = $quelle->read()){$format = substr(strrchr($datei,".") ,1);
if (in_array($format,$bildtyp)){$bildname[] = $datei;}}
$quelle->close();
srand((double) microtime()*10000000);
$typ = array_rand($bildname);
Bookmarks