![]() |
PHP N00by question
What's the difference b/w
PHP Code:
PHP Code:
|
the main difference is that upon an error (ie. the specified file isnt there) a require will give a fatal error and the script will stop there, a include will give a warning and continue with the script...
|
uh huh ... include be good, huh?
|
You use require when requiring files that are for sure needed for the script to work. For instance if you have a file like header.php which connects, sets variables, etc...if it doesn't work you need a fatal error. It could be dangerous to just include it. (i think). Include as mike said just gives a warning and continues on. so include files such as count.php which would count the hits of the site...that's it.
|
header () question
How common is the usage of hardcoding URL using header () ?
Something like PHP Code:
Edit: BTW THanks Elite. :D |
it is common whenever you want to redirect with out a message on the page your redirecting from. If you want a thanks for posting, you will be transfere in 5 seconds META_REFRESH or whatever works better.
Umm i've never seen PHP Code:
|
I haven't tried refresh yet ... but was just wondering if it be used. Let me know if it actually works ;)
Edit: Following code works for Refreshing in PURE PHP Environment. PHP Code:
|
All times are GMT -5. The time now is 04:14 AM. |
Powered by vBulletin®