myGully.com Boerse.SH - BOERSE.AM - BOERSE.IO - BOERSE.IM Boerse.BZ .TO Nachfolger
Zurück   myGully.com > Computer & Technik > Programmierung
Seite neu laden

PHP Frage.

Willkommen

myGully

Links

Forum

 
Antwort
Themen-Optionen Ansicht
Ungelesen 17.03.10, 18:54   #1
fabbi94
Erfahrener Newbie
 
Registriert seit: Jan 2010
Beiträge: 84
Bedankt: 11
fabbi94 putzt sich die Zähne mit Knoblauch. | 2596 Respekt Punktefabbi94 putzt sich die Zähne mit Knoblauch. | 2596 Respekt Punktefabbi94 putzt sich die Zähne mit Knoblauch. | 2596 Respekt Punktefabbi94 putzt sich die Zähne mit Knoblauch. | 2596 Respekt Punktefabbi94 putzt sich die Zähne mit Knoblauch. | 2596 Respekt Punktefabbi94 putzt sich die Zähne mit Knoblauch. | 2596 Respekt Punktefabbi94 putzt sich die Zähne mit Knoblauch. | 2596 Respekt Punktefabbi94 putzt sich die Zähne mit Knoblauch. | 2596 Respekt Punktefabbi94 putzt sich die Zähne mit Knoblauch. | 2596 Respekt Punktefabbi94 putzt sich die Zähne mit Knoblauch. | 2596 Respekt Punktefabbi94 putzt sich die Zähne mit Knoblauch. | 2596 Respekt Punkte
Standard PHP Frage.

Hi ich habe eine frage und zwar wie kann ich mit PHP mir eine seite zusammenfügen also dass ich z.b. 4 HTML seiten habe und 1. z.b navbar 2.header 3. Inhalt 4. Foder.

Dass ich die dann in einem PHP dokument aufrufe und in die richtige position stecke dass ich dann z.b. die navbar schnell in allen dokumenten ändern kann meine ich. Wisst ihr was ich meine wenn ich versuch ich es nochmal genauer zu erklären?

Wäre sehr erfreud über eine antwort.
fabbi94 ist offline   Mit Zitat antworten
Ungelesen 17.03.10, 22:32   #2
Irolight
Newbie
 
Registriert seit: Feb 2010
Beiträge: 70
Bedankt: 7
Irolight leckt gerne myGully Deckel in der Kanalisation! | 496004 Respekt PunkteIrolight leckt gerne myGully Deckel in der Kanalisation! | 496004 Respekt PunkteIrolight leckt gerne myGully Deckel in der Kanalisation! | 496004 Respekt PunkteIrolight leckt gerne myGully Deckel in der Kanalisation! | 496004 Respekt PunkteIrolight leckt gerne myGully Deckel in der Kanalisation! | 496004 Respekt PunkteIrolight leckt gerne myGully Deckel in der Kanalisation! | 496004 Respekt PunkteIrolight leckt gerne myGully Deckel in der Kanalisation! | 496004 Respekt PunkteIrolight leckt gerne myGully Deckel in der Kanalisation! | 496004 Respekt PunkteIrolight leckt gerne myGully Deckel in der Kanalisation! | 496004 Respekt PunkteIrolight leckt gerne myGully Deckel in der Kanalisation! | 496004 Respekt PunkteIrolight leckt gerne myGully Deckel in der Kanalisation! | 496004 Respekt Punkte
Standard

PHP-Code:
function getDokument($source) {
    if(!
is_file($source))
        return; 
// Bricht ab, wenn datei nicht exisitert
    
ob_start(); // es wird die Ausgabe intern zwischen gespeichert, sprich alles was ab jetzt eigentlich angezeigt wird, sieht man nicht
    
include($source); // läd deine Datei
    
$result ob_get_contents(); // Alles was zwischen gespeichert wurde wird in die Variable geschrieben
    
ob_end_clean(); // Zwichenspeichern wird beendet und der Speicher gelehrt.
    
return $result;
}
$meineDatei getDokument("navbar.html");
echo 
$navbar
Irolight ist offline   Mit Zitat antworten
Ungelesen 20.03.10, 16:45   #3
hilde.hilden
Anfänger
 
Registriert seit: Sep 2009
Beiträge: 1
Bedankt: 0
hilde.hilden ist noch neu hier! | 0 Respekt Punkte
Standard

nen einfaches
PHP-Code:
<html>
<head>...</head>
<body>
<?include('navbar.html')?>
<?
include('header.html')?>
....
</body>
</html>
sollte reichen
hilde.hilden ist offline   Mit Zitat antworten
Ungelesen 21.03.10, 00:26   #4
urga
Mitglied
 
Benutzerbild von urga
 
Registriert seit: Aug 2009
Ort: void* (*wtf[])(void **);
Beiträge: 453
Bedankt: 137
urga ist noch neu hier! | 0 Respekt Punkte
Standard

nimm dir nen tag zeit, und arbeite dich in eine template-engine ein. z.b. smarty: [ Link nur für registrierte Mitglieder sichtbar. Bitte einloggen oder neu registrieren ]
__________________
entropie erfordert keine wartung
urga ist offline   Mit Zitat antworten
Ungelesen 23.03.10, 19:48   #5
ckjthedogmaster
Chuck Norris sein Vater
 
Benutzerbild von ckjthedogmaster
 
Registriert seit: Aug 2009
Beiträge: 5.167
Bedankt: 3.131
ckjthedogmaster leckt gerne myGully Deckel in der Kanalisation! | 5087298 Respekt Punkteckjthedogmaster leckt gerne myGully Deckel in der Kanalisation! | 5087298 Respekt Punkteckjthedogmaster leckt gerne myGully Deckel in der Kanalisation! | 5087298 Respekt Punkteckjthedogmaster leckt gerne myGully Deckel in der Kanalisation! | 5087298 Respekt Punkteckjthedogmaster leckt gerne myGully Deckel in der Kanalisation! | 5087298 Respekt Punkteckjthedogmaster leckt gerne myGully Deckel in der Kanalisation! | 5087298 Respekt Punkteckjthedogmaster leckt gerne myGully Deckel in der Kanalisation! | 5087298 Respekt Punkteckjthedogmaster leckt gerne myGully Deckel in der Kanalisation! | 5087298 Respekt Punkteckjthedogmaster leckt gerne myGully Deckel in der Kanalisation! | 5087298 Respekt Punkteckjthedogmaster leckt gerne myGully Deckel in der Kanalisation! | 5087298 Respekt Punkteckjthedogmaster leckt gerne myGully Deckel in der Kanalisation! | 5087298 Respekt Punkte
Standard

Schliess mich hier mal an, und zwar erweitere ich mein Wissen und versuch mich grad mit PHPKIT ne HP zu erstellen. Learning by doing

Hab mir jetzt n Style runtergeladen, und läuft auch eigentlich. Krieg auch einige sachen hin im PHP, aber nun ist oben ne Navi - Box mit diversen Buttons.

Zu sehen hier: [ Link nur für registrierte Mitglieder sichtbar. Bitte einloggen oder neu registrieren ]

Die Bearbeitung der Navi Box geschieht über den Adminbereich, Vorlagen in site.htm .

Mein Vorhaben: Ich habe die BLANKO Button, und wollte nun einige Button ganz verschwinden lassen, so, das auch die Verlinkung weg ist. Nun ist die Frage, wie muss ich den Code jetzt ändern,. Die BLANKO Datei wird gleich benannt wie die Originale. Bei dem reinen Austausch der Grafik, bleibt ja der Link nur halt "versteckt"

Ich stelle jetzt nicht die ganze site.htm rein, sondern nur die eben betroffenen Zeilen.

PHP-Code:
<div id="header">
 <
table border="0" cellspacing="0" cellpadding="0">
<
tr>
 <
td colspan="12"><img src="http://mygully.com/images/style/LCL_Style_Fantasy/fantasy_02.jpg" style="width:980px;height:7px;border:0px"/></td>
</
tr>
<
tr>
 <
td><img src="http://mygully.com/images/style/LCL_Style_Fantasy/fantasy_01.jpg" style="width:75px;height:31px;border:0px"/></td>
 <
td><a href="include.php?path=start" title="Zurück zur Startseite"><img src="http://mygully.com/images/style/LCL_Style_Fantasy/fantasy_05.jpg" style="width:62px;height:31px;border:0px" onMouseOver="this.src='images/style/LCL_Style_Fantasy/fantasy_05_o.jpg'" onMouseOut="this.src='images/style/LCL_Style_Fantasy/fantasy_05.jpg'"></a></td>
 <
td><a href="include.php?path=forumsdisplay" title="Öffnet das Forum"><img src="http://mygully.com/images/style/LCL_Style_Fantasy/fantasy_06.jpg" style="width:67px;height:31px;border:0px" onMouseOver="this.src='images/style/LCL_Style_Fantasy/fantasy_06_o.jpg'" onMouseOut="this.src='images/style/LCL_Style_Fantasy/fantasy_06.jpg'"></a></td>
 <
td><a href="include.php?path=news" title="News Übersicht"><img src="http://mygully.com/images/style/LCL_Style_Fantasy/fantasy_07.jpg" style="width:67px;height:31px;border:0px" onMouseOver="this.src='images/style/LCL_Style_Fantasy/fantasy_07_o.jpg'" onMouseOut="this.src='images/style/LCL_Style_Fantasy/fantasy_07.jpg'"></a></td>
 <
td><a href="include.php?path=contentarchive&type=1" title="Artikel Übersicht"><img src="http://mygully.com/images/style/LCL_Style_Fantasy/fantasy_08.jpg" style="width:86px;height:31px;border:0px" onMouseOver="this.src='images/style/LCL_Style_Fantasy/fantasy_08_o.jpg'" onMouseOut="this.src='images/style/LCL_Style_Fantasy/fantasy_08.jpg'"></a></td>
 <
td><a href="include.php?path=contentarchive&type=3" title="Links und Partner"><img src="http://mygully.com/images/style/LCL_Style_Fantasy/fantasy_09.jpg" style="width:68px;height:31px;border:0px" onMouseOver="this.src='images/style/LCL_Style_Fantasy/fantasy_09_o.jpg'" onMouseOut="this.src='images/style/LCL_Style_Fantasy/fantasy_09.jpg'"></a></td>
 <
td><a href="include.php?path=contentarchive&type=4" title="Download Übersicht"><img src="http://mygully.com/images/style/LCL_Style_Fantasy/fantasy_10.jpg" style="width:105px;height:31px;border:0px" onMouseOver="this.src='images/style/LCL_Style_Fantasy/fantasy_10_o.jpg'" onMouseOut="this.src='images/style/LCL_Style_Fantasy/fantasy_10.jpg'"></a></td>
 <
td><a href="include.php?path=guestbook" title="Unser Gästebuch"><img src="http://mygully.com/images/style/LCL_Style_Fantasy/fantasy_11.jpg" style="width:109px;height:31px;border:0px" onMouseOver="this.src='images/style/LCL_Style_Fantasy/fantasy_11_o.jpg'" onMouseOut="this.src='images/style/LCL_Style_Fantasy/fantasy_11.jpg'"></a></td>
 <
td><img src="http://mygully.com/images/style/LCL_Style_Fantasy/fantasy_12.jpg" style="width:116px;height:31px;border:0px" /></td>
 <
td><a href="include.php?path=contact" title="Email an den Webmaster"><img src="http://mygully.com/images/style/LCL_Style_Fantasy/fantasy_13.jpg" style="width:83px;height:31px;border:0px" onMouseOver="this.src='images/style/LCL_Style_Fantasy/fantasy_13_o.jpg'" onMouseOut="this.src='images/style/LCL_Style_Fantasy/fantasy_13.jpg'"></a></td>
 <
td><a href="include.php?path=content&contentid=4" title="Impressum"><img src="http://mygully.com/images/style/LCL_Style_Fantasy/fantasy_14.jpg" style="width:80px;height:31px;border:0px" onMouseOver="this.src='images/style/LCL_Style_Fantasy/fantasy_14_o.jpg'" onMouseOut="this.src='images/style/LCL_Style_Fantasy/fantasy_14.jpg'"></a></td>
 <
td><img src="http://mygully.com/images/style/LCL_Style_Fantasy/fantasy_15.jpg" style="width:62px;height:31px;border:0px"/></td>
</
tr>
<
tr>
 <
td colspan="12"><img src="http://mygully.com/images/style/LCL_Style_Fantasy/fantasy_17.jpg" style="width:980px;height:176px;border:0px"/></td

Habe versucht, z.b die Spalte mit dem Inprint/Impressum die Verlinkung einfach rausnehmen, und halt die Grafik auszutauschen. Jedoch scheint die Grafik dann kleiner, obwohl sie gleich groß sind, weil am Rande erscheinen dann braune oder mal graue Balken zwischen den Button.

Wer weiß, wie ich das nun anstelle, das zumindest erstmal die Leiste da bleibt, aber die Links weg sind.





Habs nu selbst hingekriegt, einfach <a href="include.php?path=........."> entfernt und die folgenden Pfade zu den Bilddateien auf die jeweilige Blankodatei gelgt.
ckjthedogmaster ist offline   Mit Zitat antworten
Antwort


Forumregeln
Du kannst keine neue Themen eröffnen
Du kannst keine Antworten verfassen
Du kannst keine Anhänge posten
Du kannst nicht deine Beiträge editieren

BB code is An
Smileys sind An.
[IMG] Code ist An.
HTML-Code ist Aus.

Gehe zu


Alle Zeitangaben in WEZ +1. Es ist jetzt 16:10 Uhr.


Sitemap

().