Problem mit Klasse
Verfasst: 30.11.2008 16:12
Hallo,
hier mein Code (nur der Anfang):
Doch bekomme ich, wegen der Variable $_SERVER['SCRIPT_NAME'] diese Fehlermeldung (wenn die Variable weg ist, dann nicht):
Weiß jemand, warum ich die nicht nutzen kann?
LG, EloKoN
hier mein Code (nur der Anfang):
Code: Alles auswählen
class tinyimages {
var $folder = $_SERVER['SCRIPT_NAME'] . '/images/upload';
function __construct() {
define(DIR, $_SERVER['DOCUMENT_ROOT'].'/');
// ATTENTION!
// You need to check the session here, because methods of this class can be danger to security!
//if(!isset($_SESSION['user']['type'])) return false;
$this->folder = $this->folder;
$this->restrict = $this->folder;
}
private function leftPanel() {
$ret = array();
if ($handle = opendir ( DIR.$this->folder )) {
while (false !== ($file = readdir ( $handle ))) {
if (is_dir(DIR.$this->folder.'/'.$file) && $file != '.') {
$ret[] = array(
'path' => $file,
'name' => $file
);
}
}
closedir ($handle);
}
if(count($ret) > 0) {
$return = '';
....
Code: Alles auswählen
Parse error: syntax error, unexpected T_VARIABLE in C:xampphtdocshtmlprojekteeasyhp_1.1.5editorjscripts iny_mcepluginsimagesserver_connector inyimages.php on line 5
LG, EloKoN