Online computer courses, code, programming tutorial and sidebar information for monitoring Canadian S&P/TSX index. Build friendship and networking. Welcome to visit my blogs often!!! I also have two other sites: YouTube Channel and Google site.
Adsense
Popular Posts
- PHPWind-- A PHP forum script applcaition in China
- How to blend adsense inside your post?
- Formatting my post
- Notepad++ - Add C++ compiler
- Install PHPMailer 5.2.4 and use smtp gmail
- Set up a child account and set screen time limit in Windows 8
- Wayback Machine - see archived versions of web pages across time
- phpexcel toggle expand and hide column in EXCEL and summary
- Install PHP ibm_db2 extension in Linux (redHat)
- PHP: add a download as pdf file button in report page
Sunday, October 21, 2012
Difference between “include” and “require” in php
1.include("cart.inc") and require("cart.inc"), which should be used in PHP?
If cart.inc does not exist, include("cart.inc") will continue to execute with ignoring warning message,
while require("cart.inc") will halt the script.
It is better to use require("cart.inc") so we can know the error first.
2.Difference between echo, print, var_dump and print_r in PHP?
1) echo a string, not return value
2) print a string, return value 1
3) print_r, not only output a string, but also object type etc
4) var_dump, is similar to print_r, but produces more information than print_r.
3.What is difference between single quote and C in PHP?
The variable in double quote is evaluated, while in single quote it is left as it is.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment