phpinfo()

Discussion in 'PHP' started by runeveryday, Jul 23, 2009.

  1. #1
    i am a novice to php,recently,i am very puzzled by when i use phpinfo(),it can output a result,and at the beginng it needn't use echo.but to other functions,i must use echo at the front ,it can output a result.
    who can tell me why .thank you !
     
    runeveryday, Jul 23, 2009 IP
  2. jamespv85

    jamespv85 Peon

    Messages:
    238
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    to put it simply, that's how it's made to work. other functions may return an integer, or a string, and you need to echo that so you will see it's output.
     
    jamespv85, Jul 23, 2009 IP
  3. runeveryday

    runeveryday Active Member

    Messages:
    36
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #3
    thank you for you response! i know a little. happy! would you mind tell me how the function phpinfo() works? the difference with other functions,and is there have any functions like phpinfo() in php?
     
    runeveryday, Jul 24, 2009 IP
  4. Steve136

    Steve136 Peon

    Messages:
    240
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #4
    It basically gets all the PHP/Database/Extension/Server info from the web server and echo's it out in a nice table format for you to see.

    The function is mainly used to check configuration and if the server is set up correctly, it shouldn't be displayed to the public for security reasons, as it's like telling them everything there is to know about your server.

    I believe most people use it as a diagnostic tool.

    Regards,

    Steve
     
    Steve136, Jul 24, 2009 IP
  5. blake3334

    blake3334 Member

    Messages:
    407
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    26
    #5
    Well runeveryday, there is a whole list of build in functions, variables, and even classes that php has in store for you. If you want to learn more just head over to their site or go to w3cschools.com to read tutorials about it.
     
    blake3334, Jul 24, 2009 IP
  6. arunn

    arunn Active Member

    Messages:
    347
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    60
    #6
    phpinfo is just a Hello-its-me essay from PHp itself. you wont need it unless php isn't talking terms. ;)
     
    arunn, Jul 24, 2009 IP