PHP Syntax Error

    Diese Seite verwendet Cookies. Durch die Nutzung unserer Seite erklären Sie sich damit einverstanden, dass wir Cookies setzen. Weitere Informationen

    • PHP Syntax Error

      Hallo liebe Community,
      Bei folgendem Code bekomme ich immer einen Error.

      PHP-Quellcode

      1. <?php
      2. require('smarty/libs/Smarty.class.php');
      3. class Smarty_Demo extends Smarty
      4. {
      5. function __construct()
      6. {
      7. parent::__construct(
      8. $smarty->template_dir = 'zensiert/smarty/demo/templates';
      9. $smarty->compile_dir = 'zensiert/smarty/demo/templates_c';
      10. $smarty->cache_dir = 'zensiert/smarty/demo/cache';
      11. $smarty->config_dir = 'zensiert/smarty/demo/configs';
      12. session_start();
      13. $smarty->assign('name', $_SESSION['username'])
      14. $smarty->display('index.tpl');
      15. ?>
      Alles anzeigen


      Parse error: syntax error, unexpected ';' in /is/htdocs/wp1180721_EQ6NUQIXV8/www/index.php on line 10

      Normalerweise finde ich den Fehler, aber bei diesem irgendwie nicht.

      Bitte schnell um Hilfe.
      Gruß,
      Selfi
    • Werbung zur Unterstützung des Forums ( Bitte AddBlocker deaktivieren )

    • PHP-Quellcode

      1. <?php
      2. require('smarty/libs/Smarty.class.php');
      3. class Smarty_Demo extends Smarty
      4. {
      5. function __construct()
      6. {
      7. parent::__construct()
      8. $smarty->template_dir = 'zensiert/smarty/demo/templates';
      9. $smarty->compile_dir = 'zensiert/smarty/demo/templates_c';
      10. $smarty->cache_dir = 'zensiert/smarty/demo/cache';
      11. $smarty->config_dir = 'zensiert/smarty/demo/configs';
      12. session_start();
      13. $smarty->assign('name', $_SESSION['username'])
      14. $smarty->display('index.tpl');
      15. }
      16. }
      17. ?>
      Alles anzeigen


      Parse error: syntax error, unexpected T_VARIABLE in /is/htdocs/wp1180721_EQ6NUQIXV8/www/index.php on line 10