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 !
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.
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?
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
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.
phpinfo is just a Hello-its-me essay from PHp itself. you wont need it unless php isn't talking terms.