M
matibaski
Guest
Wie der Titel bereits sagt, ist mein Problem mit if, else.
Mein Code sieht so aus:
Der Code sitmmt ja eigentlich. Doch nun gibt es da ein Problem.
Wenn ich die Datei herauflade, dann kommt man ja auf index.php direkt und nicht index.php?....
Deshalb das default.
Aber wenn ich auf index.php bin, dann kommt folgender Error:
Warning: main() [function.main]: open_basedir restriction in effect. File(/usr/share/pear/error.php) is not within the allowed path(s): (/home/httpd/vhosts/paradoxe.de/subdomains/habboville/httpdocs:/tmp) in /home/httpd/vhosts/paradoxe.de/subdomains/habboville/httpdocs/Exponent/index.php on line 90
Warning: main(error.php) [function.main]: failed to open stream: Operation not permitted in /home/httpd/vhosts/paradoxe.de/subdomains/habboville/httpdocs/Exponent/index.php on line 90
Warning: main() [function.include]: Failed opening 'error.php' for inclusion (include_path='.:/usr/share/pear') in /home/httpd/vhosts/paradoxe.de/subdomains/habboville/httpdocs/Exponent/index.php on line 90
Und auf Zeile 90 steht:
include("error.php");
Doch ich sehe nicht, was ich falsch gemacht habe.
PS: Seid nicht so hart mit mir, bin noch neu in PHP und am lernen.![Wink :wink: :wink:](https://cdn.jsdelivr.net/joypixels/assets/8.0/png/unicode/64/1f609.png)
Mein Code sieht so aus:
PHP:
<?php
if (isset($navig))
{
$navig= $_GET['navig'];
switch ($navig)
{
default: include('_navig/home.php'); break;
case 'home': include('_navig/home.php'); break;
case 'onama': include('_navig/onama.php'); break;
case 'servis': include('_navig/servis.php'); break;
}
} else {
include("error.php");
}
?>
Wenn ich die Datei herauflade, dann kommt man ja auf index.php direkt und nicht index.php?....
Deshalb das default.
Aber wenn ich auf index.php bin, dann kommt folgender Error:
Warning: main() [function.main]: open_basedir restriction in effect. File(/usr/share/pear/error.php) is not within the allowed path(s): (/home/httpd/vhosts/paradoxe.de/subdomains/habboville/httpdocs:/tmp) in /home/httpd/vhosts/paradoxe.de/subdomains/habboville/httpdocs/Exponent/index.php on line 90
Warning: main(error.php) [function.main]: failed to open stream: Operation not permitted in /home/httpd/vhosts/paradoxe.de/subdomains/habboville/httpdocs/Exponent/index.php on line 90
Warning: main() [function.include]: Failed opening 'error.php' for inclusion (include_path='.:/usr/share/pear') in /home/httpd/vhosts/paradoxe.de/subdomains/habboville/httpdocs/Exponent/index.php on line 90
Und auf Zeile 90 steht:
include("error.php");
Doch ich sehe nicht, was ich falsch gemacht habe.
PS: Seid nicht so hart mit mir, bin noch neu in PHP und am lernen.
![Wink :wink: :wink:](https://cdn.jsdelivr.net/joypixels/assets/8.0/png/unicode/64/1f609.png)