posts tagged ‘reference’

keep your dev with the live

August 17th, 2009

When I develop a website I like to keep the development area in a subdomain (dev.bradleycushing.com) or one level back (bradleycushing.com/dev/). This way when it’s time to move my files over and make em’ live, I don’t have to do anything but upload. Make sure to keep your assets folder in the live area so those paths (icons, includes, etc.) won’t have to change either.

read the rest of this entry »

tags: , ,
posted in web | 3 comments »


same shit, different day

July 22nd, 2009

Some different techniques for if statements in php. In the second example note the use of forward slashes used to escape the quotations inside the echo function.

php if statement (xhtml only)

<?php if (is_page('writing')): ?>
<p>Lorem ipsum dolor sit amet, consectetuer 
adipiscing elit. Aenean magna tortor, luctus 
sit amet, nonummy non, consequat ac, augue. 
Cras quis lacus et est pretium dignissim. In ut 
velit vel erat accumsan vestibulum. Sed a felis. 
Nam dictum nisl id sem. Praesent pretium 
enim quis dolor.</p><?php endif; ?>
read the rest of this entry »

tags: , , , ,
posted in web | no comments »


php ob_get_contents(); buffer

July 7th, 2009

Found the dope resource when trying to store a php include inside a variable. There is a little more to it than I first thought, but not much more. Content Management Systems are built and rely upon this simpleness.

php buffer (with includes)

<?php ob_start(); // start buffer
include ('include.php');
$content = ob_get_contents(); 
// buffer contents to variable
ob_end_clean(); // end buffer and remove contents
echo $content; ?>
read the rest of this entry »

tags: , , , ,
posted in web | no comments »


Page 1 of 3123»