Unlimited Faxes, No Fees, Dedicated Phone Number
|
|
The real power of PHP comes from its functions. In PHP - there are more than 700 functions available. PHP FunctionsWe will only list a few useful functions in this tutorial. A complete list of PHP functions PHP InformationThe phpinfo() function is used to output PHP information. This function is useful for trouble shooting, providing the version of PHP, and how it is configured. The phpinfo() function options
Example
PHP Server VariablesAll servers hold information such as which URL the user came from, what's the user's browser, and other information. This information is stored in variables. In PHP, the $_SERVER is a reserved variable that contains all server information. The $_SERVER is a global variable - which means that it's available in all scopes of a PHP script. ExampleThe following example will output which URL the user came from, the user's browser, and the user's IP address:
PHP Header() FunctionThe header() function is used to send raw HTTP headers over the HTTP protocol. Note: This function must be called before anything is written to the page! ExampleThe following example will redirect the browser to the following URL: http://www.w3schools.com/:
Note: This function also takes a second parameter - an optional value of true or false to determine if the header should replace the previous header. Default is TRUE. However, if you pass in FALSE as the second argument you can FORCE multiple headers of the same type. Example
|