This file contains 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
/* | |
12306 Auto Submit => A javascript snippet to help you auto submit. | |
Copyright (C) 2011 Kevintop | |
Includes jQuery | |
Copyright 2011, John Resig | |
Dual licensed under the MIT or GPL Version 2 licenses. | |
http://jquery.org/license | |
Includes 12306.user.js |
This file contains 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 | |
require_once __DIR__ . '/PHPExcel/Classes/PHPExcel.php'; | |
$objPHPExcel = new PHPExcel(); | |
// imagecreatefromXXX (XXX is jpeg png or gif) | |
$gdImage = imagecreatefromjpeg('http://678bt.com/PHPExcel/Tests/images/officelogo.jpg'); | |
$objDrawing = new PHPExcel_Worksheet_MemoryDrawing(); |
This file contains 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 | |
/** | |
* Base ON Zhen.liu's SourceCode | |
* Add isset function for user agent | |
* Change line end | |
*/ | |
class CSV { |
This file contains 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
server { | |
listen 80; | |
server_name mrkt.com; | |
access_log /var/www/html/logs/mrkt.access.log main; | |
error_log /var/www/html/logs/mrkt.error.log; | |
location / { | |
root /var/www/html/mrkt; | |
index index.html index.htm index.php; |
This file contains 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
$cn_string_split_by_space = implode(" ", preg_split('//u', "中文字符串", -1, PREG_SPLIT_NO_EMPTY)); |
This file contains 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
// set border | |
$sheet->getStyle("A1:I{$offset}")->applyFromArray(array( | |
'borders' => array( | |
'allborders' => array( | |
'style' => PHPExcel_Style_Border::BORDER_THIN | |
) | |
) | |
)); |
This file contains 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
// get the content | |
@ob_start(); | |
$writer = PHPExcel_IOFactory::createWriter($excel, "Excel2007"); | |
$writer->save("php://output"); | |
$data = @ob_get_contents(); | |
@ob_end_clean(); | |
// set email attachment |
This file contains 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
class Util { | |
static function domain($output = true) { | |
$protocol = strpos(strtolower($_SERVER['SERVER_PROTOCOL']),'https'); | |
$host = $_SERVER["HTTP_HOST"]; | |
$port = $_SERVER["SERVER_PORT"]; | |
$domain = (($protocol !== false) ? "https" : "http") . "://" . $host; | |
$domain .= ($port == "80") ? "" : (":" . $port); |
This file contains 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
return array( | |
'controllers' => array( | |
'invokables' => array( | |
'Admin\Controller\Index' => 'Admin\Controller\IndexController', | |
'Admin\Controller\Dash' => 'Admin\Controller\DashController', | |
), | |
), | |
'router' => array( |
This file contains 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
$(document).ready(function(){ | |
$("#back-top").hide(); | |
$(function () { | |
$(window).scroll(function () { | |
if ($(this).scrollTop() > 100) { | |
$('#back-top').fadeIn(); | |
} else { | |
$('#back-top').fadeOut(); | |
} |
OlderNewer