Welcome Guest, Not a member yet? Register   Sign In
An evil timesaving secret for all!
#1

[eluser]Phil Sturgeon[/eluser]
Wanna know how to save yourself 3 months of your life in code-time?

Stop writing <?=base_url();?> all the damn time and use /, will save you AAAAAAAAGGGGGGGGGEEEEEEEEESSSS/ Im unsure why so many people keep doing this, seems crazy to me :p

I guess many people don't know about it.

Remember:

Quote:<a href="/">Go Home!</a>

Does what it says on the tin!
#2

[eluser]CI Lee[/eluser]
However if you have your CI app, lets say a blog, living in /blog and have reflected that in your config.php file then your shortcut above would take you higher up then you want to go. Also if you want your app portable then using "base_url()" means less going back and fixing things later.

I see your point and I agree, so long as it is feasible; that shortcut could come back and bite you in the ass later and well its not such a short cut then.

-Lee
#3

[eluser]Crimp[/eluser]
Here's another tip: Get a text editor like BBEdit and make your own CI clippings for most code. Not just tiny hard-to-type snippets like $this-> and -> and => and so on, but whole Class and Model and comment setups. I put a long //---&gt; divider between classes with Ctrl-D and insert a comment template with Ctrl-*. Sprinkle with #SELECTION# and #INSERTION# options and your whole input arrays, for example, are done in 10 keystokes instead of 200. Thus: &lt;?=base_url();?&gt; = / = 1 keystroke. The added benefit is that it cuts down on annoying PHP errors due to simple typos.




Theme © iAndrew 2016 - Forum software by © MyBB