php.de

Zurück   php.de > Webentwicklung > PHP-Fortgeschrittene

PHP-Fortgeschrittene Arbeiten mit PHP ohne Einschränkungen

Antwort
 
LinkBack Themen-Optionen Thema bewerten
Alt 27.10.2004, 01:24  
Gast
 
Beiträge: n/a
Standard Re: RE

Zitat:
Zitat von papalangi
[ im Handbuch ] habe ich dort folgndes gefunden
Code:
set_include_path

(PHP 4 >= 4.3.0, PHP 5)

# Beispiel 1. set_include_path() example

// Works as of PHP 4.3.0
set_include_path('/inc');

// Works in all PHP versions
ini_set('include_path', '/inc');
Letzteres Beispiel funktioniert nicht im safe_mode.

Das Überschreiben des Includepath funktioniert außerdem nur dann, wenn (in der httpd.conf) noch kein lokaler Wert gesetzt wurde. Gerade das hatte mich ein paar Stunden Suche gekostet.

Zitat:
Das Beispiel verstehe ich so, dass include files automatisch in
/root/inc gesucht werden.
Prinzipiell richtig. Ist allerdings sinnfrei, da der Webserver im Homeverzeichnis von Meister Wurzel nix zu suchen hat.

Zitat:
Ich werde jetzt mal versuchen drumrum zu programmieren und
die includes in /de/include ablegen.
Das wäre ein absoluter Pfad im Dateisystem. Nicht portable - also nicht günstig.

So oder so ähnlich:

Code:
set_include_path('.:' . $_SERVER['DOCUMENT_ROOT'] . '/de/include');
# weiter im Script
  Mit Zitat antworten
Sponsor Mitteilung
PHP Code Flüsterer

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

Antwort


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
Include Probleme meici PHP Tipps 2008 3 10.02.2008 09:37
hinter include wird eine 1 angezeigt |~Râdîant~| PHP Tipps 2008 8 19.09.2007 13:52
include problem Canni PHP Tipps 2006 26 14.11.2006 14:24
Probleme mit Switch und Include Fishup PHP Tipps 2006 8 23.05.2006 10:45
Probleme mit include PHP Tipps 2005-2 5 24.10.2005 15:50
Probleme mit header() und include() und relativen Pfaden PHP Tipps 2005-2 3 08.10.2005 16:00
Probleme mit include PHP Tipps 2005-2 20 16.08.2005 09:13
probleme mit include() + form + db PHP Tipps 2005 12 24.03.2005 13:40
Probleme mit include oder Variablen PHP Tipps 2005 11 16.03.2005 22:30
include probleme imported_dirk PHP Tipps 2005 10 13.03.2005 15:38
[Erledigt] Sessions auch bei include aktiv? PHP Tipps 2005 1 28.02.2005 19:58
probleme mit include und header Rotti PHP Tipps 2004-2 18 27.12.2004 09:20
Probleme mit include PHP Tipps 2004-2 2 23.12.2004 19:19
HTTP_GET_VARS + Include = Array leer PHP Tipps 2004-2 3 24.11.2004 15:12
Include() probleme PHP Tipps 2004 8 22.07.2004 14:36

Besucher kamen über folgende Suchanfragen bei Google auf diese Seite
programmiersprachen fishup, php5 set_include_path() geht nicht, programmiersprache fishup

Alle Zeitangaben in WEZ +2. Es ist jetzt 19:20 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.