1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. To chat with the GameOgre community, you need to have at least 15 posts. Once you have the 15 posts, post at Become A New Ogre
    Dismiss Notice

why code don't work?

Discussion in 'Online Game Development' started by rtkwar, Nov 27, 2011.

Thread Status:
Not open for further replies.
  1. shugo

    shugo Active Member Ogre Veteran

    Messages:
    2,092
    Likes Received:
    10
    Trophy Points:
    38
    Credit:
    14,282.21
    what kind of error? A syntax error, or something else? Could you show me?
     
    Last edited by a moderator: Dec 16, 2011
  2. rtkwar

    rtkwar Member

    Messages:
    139
    Likes Received:
    0
    Trophy Points:
    16
    Credit:
    - 54.14
    thats code:
    and thats error:
     
  3. shugo

    shugo Active Member Ogre Veteran

    Messages:
    2,092
    Likes Received:
    10
    Trophy Points:
    38
    Credit:
    14,282.21
    have you tried this instead?

    Code:
    <?php
    $int = 123;
    
    if(filter_var($int, FILTER_VALIDATE_INT))
    {
    echo "Integer is valid";
    }
    else
    {
    echo "Integer is not valid";
    }
    ?> 
    
    
    and try it on the server, not your own computer (though if it is core, it shouldn't matter, but better safe than sorry)

    I suspect that the ( in the echo is causing the problems. You shouldn't echo ("") like that, but like this ""

    with () around the echo php thinks that being echoed is a function, which it isn't of course

    ! shouldn't cause problems, but try it without it anyway to see what it affects, if any

    A last possible explanation is that php isn't installed on that server.
     
    Last edited by a moderator: Dec 17, 2011
Thread Status:
Not open for further replies.

Share This Page