Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > de.comp.lang.php > #4871

Variable innerhalb Output Control Functions

Path csiph.com!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From Detlef Paschke <schabau@t-online.de>
Newsgroups de.comp.lang.php
Subject Variable innerhalb Output Control Functions
Date Mon, 28 Nov 2022 16:32:36 +0100
Message-ID <tm2kaj$dm4g$2@solani.org> (permalink)
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 8bit
Injection-Date Mon, 28 Nov 2022 15:32:35 -0000 (UTC)
Injection-Info solani.org; logging-data="448656"; mail-complaints-to="abuse@news.solani.org"
User-Agent Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Betterbird/102.5.0
Cancel-Lock sha1:VOL2K50+1v+Izwdb8iokRn9grw4=
X-User-ID eJwNysEBwCAIA8CVEEmC6wiy/wjtvQ+bi6UgGBiMzMJKstOTLjn7Jld6+7ipBc1/30VWJ/cH/ScQLA==
Content-Language de-DE
Xref csiph.com de.comp.lang.php:4871

Show key headers only | View raw


Hallo,

ich hätte da mal noch ein Problem.

Ich bastele hier ein wenig an einem Script, in dem die Output Control
Functions verwendet werden soll. Das ganze ist ein Suchskript, dass bei
PHP-Dateien noch nicht zuverlässig funktioniert, die erst beim Aufruf
(z.B. per include) "zusammengebaut" werden. Mein Ansatz war dieser und
ich habe einiges an Nerven lassen müssen um zunächst die Ursache für das
nicht funktionieren zu finden: (die echo's gehören zu meiner Fehlersuche)

if ($dateiendung == '.php') {
   echo $datei;
   ob_start();
   echo $datei;
   include ($datei);
   $text = ob_get_contents();
   ob_end_clean();
   echo $datei;
   } else {

Letztendlich habe ich gefunden, dass die Variable $datei, die weiter
oben definiert wird, innerhalb der Output Control Functions nicht
verfügbar ist. Ich habe es mit globe $datei; versucht, was aber auch
nicht hilf.

In "include()" muss eine Variable, die außerhalb der Output Control
Functions definiert wird. Wie bekommt man das hin oder, geht das überhaupt?

Viele Grüße
Detlef Paschke

-- 
Das "Zitat des Augenblicks" gibt es nur auf
https://schabau.eu
Meine "Merkzettel"
https://helpdesk.schabau.eu

Back to de.comp.lang.php | Previous | NextNext in thread | Find similar


Thread

Variable innerhalb Output Control Functions Detlef Paschke <schabau@t-online.de> - 2022-11-28 16:32 +0100
  Re: Variable innerhalb Output Control Functions Karl Pflästerer <k@rl.pflaesterer.de> - 2022-11-29 08:45 +0100
    Re: Variable innerhalb Output Control Functions Detlef Paschke <schabau@t-online.de> - 2022-11-29 10:37 +0100
      Re: Variable innerhalb Output Control Functions Arno Welzel <usenet@arnowelzel.de> - 2022-12-05 02:38 +0100
        Re: Variable innerhalb Output Control Functions Detlef Paschke <schabau@t-online.de> - 2022-12-05 13:19 +0100
          Re: Variable innerhalb Output Control Functions Detlef Paschke <schabau@t-online.de> - 2023-01-30 12:01 +0100
            Re: Variable innerhalb Output Control Functions Arno Welzel <usenet@arnowelzel.de> - 2023-02-06 02:06 +0100

csiph-web