Akelos Framework v1 forum archive. This forum is no longer maintained. To report bugs please visit https://github.com/akelos/akelos/issues
    • CommentAuthorsuthern
     

    Is this normal? Try putting this function in your controller (any controller) and try accessing any methods that use that controller. ;-)

    function auto_complete_for_spot_find_spot() { // simple thing here ?> }

    When I do it, I get a white (error) screen. This makes it hard test functions that return strings of inline php (like ajax responses). Does anyone else have their app crash by putting the above function in a controller? Thanks!

    • CommentAuthorThijs
     

    I get an

    Parse error: syntax error, unexpected $end in /Applications/MAMP/energy neighbourhoods/app/controllers/discussion_controller.php on line 122

    line 122 being the last line in the file (where the ?> is) and not the line where

    // simple thing here ?>
    

    is.

    I'm on changeset 479 from the trunk.

    • CommentAuthorJeff
     

    PHP parser terminates php code blocks at ?>, including inside comments.

    So this would be valid code:

     <?php echo "Hello World"; // "blahblah"; ?>
    

    However, with your code posted above, the closing curly brace isn't enclosed in php tags, so it isn't parsed. Yes, it's annoying. Simply remove the ?> from your comment or use the muti-line comments: /* */.

    Refer to the PHP documentation

    • CommentAuthorsuthern
     

    Ahh, I see why it's this way. I'll use multi-line comments in these special cases.

    Thanks!