Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Arno Welzel Newsgroups: comp.lang.php Subject: Re: Show picture in window Date: Sat, 19 Oct 2019 20:39:38 +0200 Lines: 48 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit X-Trace: individual.net gmZ6PvRlbt2IgH4iucbbtAlKCvbR+hRgOYAVCjPL92AAIZOMcW Cancel-Lock: sha1:HVykNDveePnMuCdJKWTXnJ8VT64= In-Reply-To: Xref: csiph.com comp.lang.php:18082 Heiko Wetteborn: > (sorry for german language) > Hallo Leute, > > ist de.comp.lang.php tot? It doesn't matter, if de.comp.lang.php is "dead" or not. This is still an English speaking newsgroup. [...] > Hier nun das Script (PHP 5.4): PHP 5.4 is *way* outdated! You should use at least PHP 7.1 and even this version will be end of life this year. So better start at least with PHP 7.2. Also see: > include("function.php"); What is in function.php? > $bildnr=$_GET['bildnr']; > $dir= documentroot() . "/fotoalbum/*.jpg"; What does documentroot() return? > foreach (glob($dir) as $filename) > { > $eintraege[] = $filename; > } > $picname = $eintraege[$bildnr - 1]; > if (file_exists($picname)) > { > Header ("Content-type: image/jpeg"); header() and not Header() - also see: https://www.php.net/manual/en/function.header.php You should also get familiar with a PHP debugger like xdebug and an editor which suports debugging. -- Arno Welzel https://arnowelzel.de