Einzelnen Beitrag anzeigen

Balu der Bär
(Gast)

n/a Beiträge
 
#1

[D4PHP] Projekt auf Webserver läuft nicht

  Alt 1. Mai 2007, 10:46
Moin Moin liebe Leute,

ich habe heut Delphi for PHP installiert und spiele nun ein bisschen damit rum. Leider schaffe ich es nichtmal ein fast leeres Projekt auf meinem Webspace zum Laufen zu bekommen. Folgende Dateien habe ich in ein Verzeichnis meines Webservers kopiert: extctrls.inc.php, forms.inc.php, Project2.dsk, Project2.phprj, stdctrls.inc.php, unit2.php, unit2.xml.php und vcl.inc.php.

Die Unit 2 sieht folgendermaßen aus:
Delphi-Quellcode:
<?php
        //Includes
        require_once("vcl/vcl.inc.php");
        use_unit("forms.inc.php");
        use_unit("extctrls.inc.php");
        use_unit("stdctrls.inc.php");

        //Class definition
        class Unit2 extends Page
        {
              public $Button1 = null;
              public $Label2 = null;
              public $Label1 = null;
              public $Edit2 = null;
              public $Edit1 = null;
              function Button1Click($sender, $params)
              {
                $this->Edit2->Text = $this->Edit1->Text . " <- Damn it!";
               }


        }

        global $application;

        global $Unit2;

        //Creates the form
        $Unit2=new Unit2($application);

        //Read from resource file
        $Unit2->loadResource(__FILE__);

        //Shows the form
        $Unit2->show();

?>
Das einzige was ich zu sehen bekomme, ist:
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in d:\.....\crap\unit2.php on line 11

Starte ich das Projekt direkt aus D4PHP heraus läuft es fehlerfrei. Jemand ne Idee?
  Mit Zitat antworten Zitat