Welcome, Guest. Please login or register.
Did you miss your activation email?
May 23, 2012, 10:41:30 AM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
155402 Posts in 21698 Topics by 7729 Members
Latest Member: adnan
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: include Fehler  (Read 565 times)
yggdrasil

Offline Offline

Posts: 151



« on: July 08, 2008, 04:59:07 PM »

Hallo,

wollte meine Funktionen aus einem externen php File inkludieren.Habe geschrieben:

Code:
include TEMPLATE_DIR.PHP.'phpFunctions.php';
wenn ich statt dem include ein echo mache gibt er mir den richtigen Pfad aus:
http://localhost/THEA/templates/thea/PHP/phpFunctions.php

So, jetzt werden Errors geworden die:

Warning: include() [function.include]: URL file-access is disabled in the server configuration in C:\xampp\htdocs\THEA\templates\thea\index.php on line 33

Warning: include(http://localhost/Thea/templates/thea/PHP/phpFunctions.php) [function.include]: failed to open stream: no suitable wrapper could be found in C:\xampp\htdocs\THEA\templates\thea\index.php on line 33

Warning: include() [function.include]: Failed opening 'http://localhost/Thea/templates/thea/PHP/phpFunctions.php' for inclusion (include_path='.;C:\xampp\php\pear\') in C:\xampp\htdocs\THEA\templates\thea\index.php on line 33


Was muss ich tun?^^
Logged

Fight for animal Liberation!!!
doc
Guest
« Reply #1 on: July 08, 2008, 05:28:08 PM »

Hallo,

die Fehlermeldung spricht doch eigentlich Bände. Deine Serverumgebung erlaubt aus Sicherheitsgründen keine Datei-Includes per URL. Verwende statt TEMPLATE_DIR mal WB_PATH . '/pfad/datei.php';
Informationen zu Konstanten etc. findest Du hier:
http://help.websitebaker.org/pages/de/advanced-doku/entwickler-guide/variablen-und-konstanten.php

Christian
Logged
yggdrasil

Offline Offline

Posts: 151



« Reply #2 on: July 08, 2008, 05:39:32 PM »

Ich verwende xampp am localhost, wär mir nicht bekannt, dass ich dort keine zugriffsrechte hätte, habe auch schon bei anderen projekten die ich nicht mit WB gemacht hab so zugriff.

Wie könnte ioch dieses Beispiel jetzt lösen?

Gruß
Logged

Fight for animal Liberation!!!
doc
Guest
« Reply #3 on: July 08, 2008, 05:41:12 PM »

Quote
Wie könnte ioch dieses Beispiel jetzt lösen?
Indem Du meine erste Post mal liest und den Tip darin umsetzt (so als Tipp der 2te Satz).

Christian
Logged
yggdrasil

Offline Offline

Posts: 151



« Reply #4 on: July 08, 2008, 06:06:47 PM »

WB_PATH ist blödsinn. Im Endeffekt hat es gereicht, komplett auf WB variablen zu verzichten und einfach nur include 'PHP/phpFunctions.php'; zu schreiben.

Gruß
Logged

Fight for animal Liberation!!!
doc
Guest
« Reply #5 on: July 08, 2008, 07:10:54 PM »

Hallo,

wenn Du meinst dass WB_PATH Blödsinn ist wird es wohl so sein  smiley

Gruss Christian

Logged
frank76

Offline Offline

Posts: 81


WWW
« Reply #6 on: July 08, 2008, 07:25:25 PM »

 cheesy
Logged
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!