daFox
Grünschnabel
Hallo!
Ich hab mal zum Test vollgendes Script auf meinem Server
(FreeBSD 5.2.1 + Apache/2.0.52 + PHP/5.0.2) hochgeladen.
Als Ausgabe kommt aber nur "Array ( [0] => )", also ein Teil des Kommentars
aus Zeile 5?!
http://dafox.ath.cx/nu/test.php
Seltsam ist auch das phpinfo(), phpmyAdmin und phpsysInfo funktionieren.
(http://dafox.ath.cx/info.php)
Kann mir jemand sagen woran das liegt?
Danke
[EDIT]
hab grad gesehen das es die vordefinierte Variable $PHP_SELF nicht gibt, wenn man $_SERVER["PHP_SELF"] nimmt funktionierts
[/EDIT]
Ich hab mal zum Test vollgendes Script auf meinem Server
(FreeBSD 5.2.1 + Apache/2.0.52 + PHP/5.0.2) hochgeladen.
PHP:
<?php
echo(basename ($PHP_SELF)."<br>"); // returnes filename.php
$file = basename ($PHP_SELF);
$file = explode(".",$file);
print_r($file); // returnes Array ( [0] => filename [1] => php )
echo("<br>");
$filename = basename(strval($file[0]),$file[1]);
echo($filename."<br>"); // returnes filename
echo(basename ($PHP_SELF,".php")."<br>"); // returnes filename
echo("<br>");
echo("<br>");
//show_source(basename ($PHP_SELF,".php").".php")
show_source($file[0].".".$file[1])
?>
Als Ausgabe kommt aber nur "Array ( [0] => )", also ein Teil des Kommentars
aus Zeile 5?!
http://dafox.ath.cx/nu/test.php

Seltsam ist auch das phpinfo(), phpmyAdmin und phpsysInfo funktionieren.
(http://dafox.ath.cx/info.php)
Kann mir jemand sagen woran das liegt?
Danke
[EDIT]
hab grad gesehen das es die vordefinierte Variable $PHP_SELF nicht gibt, wenn man $_SERVER["PHP_SELF"] nimmt funktionierts

[/EDIT]
Zuletzt bearbeitet: