This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Go back link functionality | |
// Requires HTML link with id="back-to-last-page" which is hidden by default with display: none; | |
if (window.history && window.history.pushState) { | |
// Only display if referrer matches current hostname | |
var matchHostname = new RegExp('http(s)?:\/\/' + window.location.host); | |
if (matchHostname.test(document.referrer)) { | |
// Show link and go back via History API |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Read CSV file | |
// PHP5.4+ | |
ini_set('auto_detect_line_endings', true); | |
$file = new SplFileObject("path/to/file.csv"); | |
$file->setFlags(SplFileObject::READ_CSV); | |
$line = 0; | |
$headers = []; | |
foreach ($file as $row) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Studio 24 Application | |
* | |
* @category Studio 24 | |
* @package S24_Application | |
* @copyright Copyright (c) 2009-2010 Studio 24 Ltd (www.studio24.net) | |
* @license http://framework.zend.com/license/new-bsd New BSD License | |
* @author Simon R Jones <[email protected]> | |
* @version 1.1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Error reporting | |
error_reporting(E_ALL); | |
ini_set('display_errors', true); | |
// Return the Apache user | |
$tmpFilename = tempnam('/tmp', 'TEST'); | |
$handle = fopen($tmpFilename, 'w'); | |
fwrite($handle, 'testdata'); | |
fclose($handle); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a href="javascript:var f%3Ddocument.getElementsByTagName(%27form%27)%3Bfor (var i%3D0%3B i<f.length%3Bi%2B%2B)%7Bf%5Bi%5D.setAttribute(%27novalidate%27,%27novalidate%27)%3B%7D">HTML5 novalidate</a> |
NewerOlder