<?php | |
$arr = array(1, 2, 3); | |
/** | |
* PHP Weirdness 1 | |
* 'continue' acts like 'break' inside of a switch statement when inside of a loop | |
* whereas 'continue' acts as expected inside an elseif block | |
*/ | |
foreach ($arr as $item) { | |
switch($item) { |
<form id="contact" name="contact" method="post"> | |
<fieldset> | |
<label for="name" id="name">Name<span class="required">*</span></label> | |
<input type="text" name="name" id="name" size="30" value="" required/> | |
<label for="email" id="email">Email<span class="required">*</span></label> | |
<input type="text" name="email" id="email" size="30" value="" required/> | |
<label for="phone" id="phone">Phone</label> | |
<input type="text" name="phone" id="phone" size="30" value="" /> |
<header> | |
<img src="https://richardmiddleton.me/comic-60.png" alt=""> | |
<ul> | |
<li><a href="">Home</a></li> | |
<li><a href="">About</a></li> | |
<li><a href="">Blog</a></li> | |
<li><a href="">Signup</a></li> | |
<li><a href="">Contact</a></li> | |
</ul> | |
</header> |
#in config.php | |
$base_url=(isset($_SERVER['HTTPS']) ? "https://" : "http://").$_SERVER['HTTP_HOST']; | |
$base_url.= str_replace(basename($_SERVER['SCRIPT_NAME']), '', $_SERVER['SCRIPT_NAME']); | |
$config['base_url'] = $base_url; |
I have always struggled with getting all the various share buttons from Facebook, Twitter, Google Plus, Pinterest, etc to align correctly and to not look like a tacky explosion of buttons. Seeing a number of sites rolling their own share buttons with counts, for example The Next Web I decided to look into the various APIs on how to simply return the share count.
If you want to roll up all of these into a single jQuery plugin check out Sharrre
Many of these API calls and methods are undocumented, so anticipate that they will change in the future. Also, if you are planning on rolling these out across a site I would recommend creating a simple endpoint that periodically caches results from all of the APIs so that you are not overloading the services will requests.
Most of programs will not accept an email using just @localhost as domain.
So, edit /etc/hosts
file to make the domain localhost.com point to your machine, including this content to the file:
127.0.0.1 localhost.com
- We call for the minified Vue.js library that’s hosted on our own server (for security reasons).
- Download the Development version: https://vuejs.org/js/vue.js and the production version: https://vuejs.org/js/vue.min.js
- Copy this files into the public/js folder
- Download the development version from: https://vuejs.org/js/vue.js and the production version: https://vuejs.org/js/vue.min.js
- Copy this files into the public/js folder
- First we have a basic HTML boilerplate file. Create a test file: public/index.php
<div class="page"> | |
<div class="video-wrap"> | |
<div class="video"> | |
<iframe width="600" height="340" src="https://www.youtube.com/embed/pfqkRYSs4Rg" frameborder="0" gesture="media" allowfullscreen></iframe> | |
</div> | |
</div> | |
<div class="content"> | |
<p>Lorem, ipsum dolor sit amet consectetur adipisicing elit. Animi blanditiis recusandae distinctio optio commodi tenetur quisquam qui porro, aliquid inventore perferendis quibusdam at! Quisquam illum distinctio eveniet corrupti cupiditate quis?</p> | |