Texte Einbinden ?

  • naja ich wollte in meine seite, anstatt immer meine index.php zu kopiren und dann zu ändern ..

    den bereich wo anfangs die news sind, durch andere .html bzw. .php dateien fülen.


    sodass ich nur diese .html dateien brauche und nicht die komplette index.php seite kopieren muss und sie nochmal ganz zu bearbeiten.

    gibt es eine möglichkeit, wie ich durch eine kleine veränderung die index.php datei dazu bewege die news z.b. durch ein template wie z.b. die logindatei zu verändern, ohne wie oben genannt die datei zu kopieren und zu verändern ?

    http://www.bankai.dl.am

    das ist die seite

  • Du kannst die news.php includen!

    Wenn man auf einen link klickt wird dann per ...index.php?content=news der wert news in das get array gelegt. Eine passende PHP Abfrage könnte so aussehen:

    Code
    $content = $_GET["content"];
    $content_path ="order/".$content.".php";
    include("$content_path");

    Dann haste eine index datei, die beim klicken den inhalt einliest...

    Win·dows
    Noun.
    A thirty-two bit extension and graphical shell to a sixteen-bit patch to an eight-bit operating system originally coded for a four-bit microprocessor which was written by a two-bit company that can't stand one bit of competition.

  • jo dann include mal. aber das GET zeug brauchst du nicht wenn du nur die news includen willst. mach einfach in der index.php da wo die news hinkommen sollen so:

    <? include 'news.php'; ?>

    dann in der news.php kannst du einfach die news abändern.
    ist mit einem iframe vergleichbar..

    so long

  • Auf meinem Server habe ich kein SQL zur Verfügung, da habe ich dann .txt Dateien genommen und ausgelesen.
    Aber das includen ist sehr praktich!

    Win·dows
    Noun.
    A thirty-two bit extension and graphical shell to a sixteen-bit patch to an eight-bit operating system originally coded for a four-bit microprocessor which was written by a two-bit company that can't stand one bit of competition.

  • phore
    Nein, ich meinte das man den gesamten content includet!
    Ich glaube das ist auch das was aser geuscht hat.

    Dann wird per link der gewünschte Ihnalt an das script übermittelt...

    Ansonsten braucht man natürlich nur das include!

    Win·dows
    Noun.
    A thirty-two bit extension and graphical shell to a sixteen-bit patch to an eight-bit operating system originally coded for a four-bit microprocessor which was written by a two-bit company that can't stand one bit of competition.

  • ich brauche das GET >.> nur ... wird das etwas komisch ^^ da ich noch ein login script habe nunja danke für die hilfe ^^ das alles klappt wunderbar

  • Bitte schön!
    Dann ist ja alles super!

    Win·dows
    Noun.
    A thirty-two bit extension and graphical shell to a sixteen-bit patch to an eight-bit operating system originally coded for a four-bit microprocessor which was written by a two-bit company that can't stand one bit of competition.