php.de

Zurück   php.de > Webentwicklung > PHP Einsteiger > PHP Tipps 2004

 
 
LinkBack Themen-Optionen Thema bewerten
Alt 23.06.2004, 13:20  
Gast
 
Beiträge: n/a
Standard Link / Open Problem

Und das zweite Problem...

Mit folgendem Script gebe ich die Files aus dem Ordner /fun/flash/ als Link wieder.

<?
$the_array = Array();
$handle = opendir('fun/flash');
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
$the_array[] = $file;
}
}
closedir($handle);
sort ($the_array);
reset ($the_array);
while (list ($key, $val) = each ($the_array)) {
echo "<a href=index.php?menu=$val>$val</a>
";
}
?>

Klicke ich auf eines der Files, öffnet er mir die News.php.

Hier die Index.php:

--------------------------------------------------------------------------------------

<head>
<link rel="stylesheet" type="Text/css" href="style.css">
</head>

<div id="iebug">
<div id="box">


<div id="bannerl">
<?php
include "banner.php"
?>
</div>



<div id="navil">
<?php
include "navi.php"
?>
</div>



<div id="menul">
<?php
include "menu.php"
?>
</div>



<div id="picturel">
<?php
include "picture.php"
?>
</div>



<div id="nachrichtenl">
<?php
include "nachrichten.php"
?>
</div>



<div id="kalenderl">
<?php
include "kalender.php"
?>
</div>



<div id="inhaltl">
<?php
include "inhalt.php"
?>
</div>



<div id="footerl">
<?php
include "footer.php"
?>
</div>

</div>
</div>

--------------------------------------------------------------------------------------

Und hier die Inhalt.php

--------------------------------------------------------------------------------------

<div id="inhaltc01">
<?php
if(!isset($_GET['menu'])) $_GET['menu'] = "News";
print $_GET['menu'];
?>
</div>



<?php
function utime (){
$time = explode( " ", microtime());
$usec = (double)$time[0];
$sec = (double)$time[1];
return $sec + $usec;
}
$start = utime();
?>

<div id="inhaltc02">

<?php
if(isset($_GET['menu'])) {
switch($_GET['menu']) {

// Navi

case "News":
include "news/news.php";
break;

case "Login":
include "intern/login.php";
break;

case "Impressum":
include "credits/impressum.php";
break;

case "Guestbook":
include "guestbook/guestbook.php";
break;

// Information

case "Nightlife Karlsruhe":
include "information/nightlife.php";
break;

case "Wetter":
include "information/wetter.php";
break;

case "Nachrichten":
include "information/nachrichten.php";
break;

// Guides

case "Computer":
include "guides/computer.php";
break;

case "ATI Radeon 9700 Flashing Guide":
include "guides/computer/ati/ati.php";
break;

case "ULTIMATE BOOT CD - Edit Guide":
include "guides/computer/bootcd/bootcd.php";
break;

case "Internet Explorer - Sichere Einstellungen":
include "guides/computer/ie/ie.php";
break;

case "Sichere VNC Verbindung per OpenSSH":
include "guides/computer/openssh/openssh.php";
break;

case "Ports Auflistung":
include "guides/computer/ports/ports.txt";
break;

case "Spyware vom System entfernen":
include "guides/computer/spyware/spyware.php";
break;

case "Games":
include "guides/games.php";
break;

case"Battlefield 1942 Performance Guide":
include "guides/games/battlefield/battlefield.php";
break;

case "Multimedia":
include "guides/multimedia.php";
break;

case "Canon Powershot A40 Photo Guide":
include "guides/multimedia/canon/canon.php";
break;

case "DVD-Rip Anleitung":
include "guides/multimedia/dvdrip/dvdrip.php";
break;

case "Sony T610 Branding entfernen":
include "guides/multimedia/t610/t610.php";
break;

// Fun

case "Pics":
include "fun/pics/pics.php";
break;

case "Witze | Texte":
include "fun/wt/wt.php";
break;

case "Witze":
include "fun/wt/witze.php";
break;

case "Texte":
include "fun/wt/texte.php";
break;

case "Flash":
include "fun/flash/flash.php";
break;

// Diverses

case "Radio":
include "diverses/radio.php";
break;

case "Charts":
include "diverses/charts.php";
break;

case "Tribute To":
include "diverses/tribute/tribute.php";
break;

case "PC Config":
include "diverses/pcconfig.php";
break;

case "Digital Cam Pics":
include "diverses/cam/campics.php";
break;


// Credits

case "About This Site":
include "credits/about/about.php";
break;

case "Atombombe":
include "credits/about/atombombe.php";
break;

case "Fallout":
include "credits/about/fallout.php";
break;

case "Night After":
include "credits/about/nightafter.php";
break;


case "Links":
include "credits/links.php";
break;

case "Supporting":
include "credits/supporting/supporting.php";
break;

case "Lebenslauf":
include "credits/lebenslauf.php";
break;

// Default Loader

default:
include "news/news.php";
break;
}
} else {
include "news/news.php";
}
?>
</div>

<div id="inhaltc03">
[img]grafik/pfeil.gif[/img]
<?php
$end = utime(); $run = $end - $start; echo "Seite in " . substr($run, 0, 5) . " Sekunden geladen";
?>
</div>

--------------------------------------------------------------------------------------

Muss ich jetzt die ganzen *.swf Files in der inhalt.php bekanntgeben, damit er mit die per default die news.php, weil er den Pfad der *.swf Dateien nicht kenn?

Sorry für den vielen Text, aber ich hab wirklich noch so meine Probleme mit php.
 
Sponsor Mitteilung
PHP Code Flüsterer

Registriert seit: 21.08.2005
Beiträge: 4682
PHP-Kenntnisse:
Fortgeschritten

 


Themen-Optionen
Thema bewerten
Thema bewerten:

Forumregeln
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are an
Gehe zu

Ähnliche Themen
Thema Autor Forum Antworten Letzter Beitrag
[Erledigt] Galerie Problem... coraplanet PHP Tipps 2008 4 06.06.2008 13:42
Problem beim ausrichten der Schrift im Link mokus HTML, Usability und Barrierefreiheit 6 01.02.2007 23:58
IE5 link futzt net, rechte Maus + link öffnen geht hackenbusch HTML, Usability und Barrierefreiheit 1 03.01.2007 00:48
datensätze defekt oder problem mit dem einlesen? Ministry Datenbanken 4 06.07.2006 18:42
Problem mit PHPSESSID Jacks Rache PHP Tipps 2006 7 19.03.2006 17:00
link mit absoluter url-angabe funzt nicht in php PHP Tipps 2006 6 27.02.2006 15:23
Link in Frame der auf Seite ohne Frames verweist HTML, Usability und Barrierefreiheit 1 25.02.2006 14:00
ein link in einem TD Sclot HTML, Usability und Barrierefreiheit 4 12.02.2005 13:06
Link Problem HTML, Usability und Barrierefreiheit 6 08.01.2005 16:26
Problem mit link test022 PHP Tipps 2004-2 8 13.12.2004 13:51
Problem mit links in Schleife web2 PHP Tipps 2004-2 2 23.11.2004 12:58
Problem mit Link Style HTML, Usability und Barrierefreiheit 8 05.08.2004 17:59
[Erledigt] Link Problem HTML, Usability und Barrierefreiheit 5 27.07.2004 09:52
Problem mit 2 gleichzeitigen MySQL abfragen PHP Tipps 2004 2 08.07.2004 13:57
Problem mit Link automatisch öffnen PHP Tipps 2004 1 04.07.2004 21:00

Besucher kamen über folgende Suchanfragen bei Google auf diese Seite
project box with pc board included, div id= \picturel\, php com run does not work, witze include

Alle Zeitangaben in WEZ +2. Es ist jetzt 05:01 Uhr.




Powered by vBulletin® Version 3.7.2 (Deutsch)
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
Aprilia-Forum, Aquaristik-Forum, Liebeskummer-Forum, Zierfisch-Forum, Geizkragen-Forum

Creative Commons License
Dieser Inhalt ist unter einer Creative Commons-Lizenz lizenziert.