I often scribble down important notes and stuff I learn in a notebook, I prefer to use a traditional way of learning, using pen and paper. Here are some notes I jotted down.
- Use var_dump($variable), this will outputs the variable to your screen. This is similar function to JavaScript’s console.log(variable).
-
This is a html file, there is a form, when I click the submit button, it will send a POST to submit.php, the variables can be accessed from the controller.
1234<form method='post' action='index.php/submit'><label name="password"><label name="status"></form>12$_POST['password']$_POST['status']
- <?php echo base_url(); ?> outputs the base url of your website.
- I noticed a lot of these patterns in the html code.
1234567891011121314151617181920<?phpif(isset($slideQuery)) && !empty($slideQuery)) {?><ul class="slides"><?phpforeach($slideQuery as $slide) {if($slide->slide_type == "bottom"){continue;?><?php}}?><?php}?> - Advice when looking at codeigniter website code for the first time, examine front page code part by part.
- application/config/routes.php sets where the controller starts
- Bill’s advice: Always make backup, in case batshit happens.
- Web development is like game development, an artist/ designer gives the psd to the programmer, and the programmer program the website/ game.
- Instead of using span6 and span6 (bootstrap) to make a row, use width:50%, float:left and width:50%, float:left.
- Never use inline style, use CSS instead, you might have problems with responsiveness.