|
ksan
|
 |
« on: October 24, 2008, 02:06:51 AM » |
|
Hey guys  sorry, I am just so excited about introducing myself *shivers*. Well I am just a regular dude who got into programming early this year. I have been learning PHP and MySQL since and it's quite fun to write scripts, build applications and all. I finally want to get my grove on with the spammin and I'm working on my own content generator. My coding style is like the worst ever. Writing my own functions, object oriented programming ?  not really... But I get things done. Even if it means that I have to use inlcude() where others would just use their own functions. Anyways, you guys seem like a cool bunch and I look forward to learning a lot from y'all. take care
|
|
|
|
|
Logged
|
No links in signatures please
|
|
|
|
Bompa
|
 |
« Reply #1 on: October 24, 2008, 04:29:40 AM » |
|
|
|
|
|
|
Logged
|
"Everything that can be counted does not necessarily count; everything that counts cannot necessarily be counted." -- Albert Einstein
|
|
|
|
nutballs
|
 |
« Reply #2 on: October 24, 2008, 07:22:09 AM » |
|
|
|
|
|
|
Logged
|
I could eat a bowl of Alphabet Soup and shit a better argument than that.
|
|
|
|
perkiset
|
 |
« Reply #3 on: October 24, 2008, 08:57:28 AM » |
|
Welcome to The Cache ksan. BTW - using include() is not bad juju. Good style can live there as well 
|
|
|
|
|
Logged
|
It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
|
|
|
|
vsloathe
|
 |
« Reply #4 on: October 24, 2008, 11:07:51 AM » |
|
 require_once() for me
|
|
|
|
|
Logged
|
hai
|
|
|
|
perkiset
|
 |
« Reply #5 on: October 24, 2008, 11:34:23 AM » |
|
I require_once all the time as well, keeps me honest - just so you know, however, the _once suffix on both require and include incur additional overhead and can be a bit of a burden - if you KNOW what you'll need in a script, you're better off simply require-ing it at the top of your [main]
(Read this at the Zend site a while ago)
|
|
|
|
|
Logged
|
It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
|
|
|
|
vsloathe
|
 |
« Reply #6 on: October 24, 2008, 11:37:57 AM » |
|
Yeah my framework involves a standard naming paradigm for the filesystem. class.something.php
If I call
sloatheSystem::loadClass('something');
it has to know what it's talking about. Also have to make sure that I haven't required/included the file again. So I could use my own check, or incur a couple extra processor cycles. Either way, I'm giving it a wee bit of execution time overhead.
|
|
|
|
|
Logged
|
hai
|
|
|
|
dink
|
 |
« Reply #7 on: October 24, 2008, 04:14:43 PM » |
|
include() is very handy if you need a fail-safe. I had occasion to regret using require() just a while back. My page was offline for, oh, say 4 days because I pulled one of my dumbass stunts.  I've since started using a double fail-safe method. A graceful exit and on with business for me.
|
|
|
|
|
Logged
|
[quote Nutballs] the universe has a giant fist, and its got enough whoop ass for everyone. [/quote]
|
|
|
|
perkiset
|
 |
« Reply #8 on: October 24, 2008, 05:03:54 PM » |
|
 I think I know EXACTLY what kind of bonehead mistake that was... it is *conceivable* that I've pulled something similar just a few too many times m'self.
|
|
|
|
|
Logged
|
It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
|
|
|
|
dink
|
 |
« Reply #9 on: October 24, 2008, 08:39:36 PM » |
|
lol. Yeah, I'd imagine you have. **you didn't ask about my 'double fail safe'** It involves elastic waistbands, suspenders, and a belt. 
|
|
|
|
|
Logged
|
[quote Nutballs] the universe has a giant fist, and its got enough whoop ass for everyone. [/quote]
|
|
|
|
perkiset
|
 |
« Reply #10 on: October 24, 2008, 10:47:00 PM » |
|
 The wisdom of the ages, right there.
|
|
|
|
|
Logged
|
It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
|
|
|
|