Thread: -> operator

    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2000
    Posts
    4
    Rep Power
    0
    Hello,

    I try to do my first steps in class programming in PHP. The strange thing is that the '->' operator is not recognised at all.

    Any part of the code that follows the -> operator is simply appearing on the browser as pure text.

    I cannot figure out what the problem can be. I am working on this machine (Apache/PHP3 and now PHP4) for some time without any troubles.

    It's the first time I use this operator though.

    Any help will be greatly appreciated.

    Nadia
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    1
    Rep Power
    0
    could you give us an excerpt of the code(class def., etc...) you wrote so we can help you!
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2000
    Posts
    4
    Rep Power
    0
    I tried several things like this code:

    <?php
    class user
    {
    var $name;
    var $password;
    var $last_login;

    function init($in_name, $in_passwd)
    {
    $this->name = $in_name;
    }


    }
    ?>

    This will show on the browser the code (as text) after the '->' operator.

    Thanks for the reply

    Nadia
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2000
    Posts
    4
    Rep Power
    0
    Hi,

    I found out what the problem was. It had to do with the Apache configuration. So, the php code I was writing was not recognised as such.

    Nadia

Similar Threads

  1. std::basic_ostream < wchar_t > :: operator <<
    By MJEggertson in forum C Programming
    Replies: 4
    Last Post: January 4th, 2004, 09:38 PM
  2. how does char* work???
    By MillionBacteria in forum C Programming
    Replies: 18
    Last Post: December 12th, 2003, 11:38 AM
  3. -> operator ?
    By jonnyfive in forum C Programming
    Replies: 5
    Last Post: October 7th, 2003, 11:10 AM
  4. The -> operator in OOP
    By ezuk in forum Perl Programming
    Replies: 5
    Last Post: May 5th, 2003, 04:35 PM
  5. How > To > Do > Menus > Like > This?
    By bonkerz in forum PHP Development
    Replies: 2
    Last Post: October 27th, 2001, 02:44 AM

IMN logo majestic logo threadwatch logo seochat tools logo