需要将 PHP 各版本安装到 /usr/local/php$VER/ 目录下
保存 php-switch 到 /usr/local/bin目录下
执行以下命令
chmod +x /usr/local/bin/php-switch| <?php | |
| /** | |
| * 支持对多维数组,对象,... 进行编码转换 | |
| * 在不指定来源编码时,由系统自动检测编码类型 | |
| * | |
| * @link http://cn2.php.net/manual/zh/function.mb-detect-encoding.php | |
| * @link http://cn2.php.net/manual/zh/function.mb-detect-order.php | |
| * @param mixed $data 需要转换的数据 | |
| * @param string $to_encoding 目标编码类型 |
| <?php defined('SYSPATH') or die('No direct script access.'); | |
| /** | |
| * 数据库迭代器 | |
| */ | |
| class Database_Iterator implements SeekableIterator, Countable | |
| { | |
| /** | |
| * select 查询语句 | |
| * |
| #!/bin/sh | |
| ExtensionsPath="/Applications/Parallels Desktop.app/Contents/Library/Extensions/10.6/" | |
| cd "$ExtensionsPath" | |
| sudo chown -R root:wheel "$ExtensionsPath" | |
| sudo kextload -r . prl_hypervisor.kext | |
| sudo kextload -r . prl_hid_hook.kext | |
| sudo kextload -r . prl_usb_connect.kext |
| <?php | |
| namespace Base\Paginator; | |
| class QueryBuilder extends \Phalcon\Paginator\Adapter\QueryBuilder | |
| { | |
| public function getPaginate() | |
| { | |
| // 解决 php5.3 在空记录集时,调用 getPaginate() 方法出错的 bug |
| (function (factory) { | |
| if (typeof define === 'function' && define.amd) { | |
| define(['jquery'], factory); | |
| } else if (typeof exports === 'object') { | |
| factory(require('jquery')); | |
| } else { | |
| factory(jQuery); | |
| } | |
| }(function ($) { |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>name</key> | |
| <string>Blackboard</string> | |
| <key>author</key> | |
| <string>Domenico Carbotta</string> | |
| <key>settings</key> | |
| <array> |
| [ | |
| { "keys": ["ctrl+shift+c"], "command": "convert_to_utf8" }, | |
| { "keys": ["ctrl+t"], "command": "side_bar_new_file2" }, | |
| { "keys": ["f2"], "command": "side_bar_rename" }, | |
| { "keys": ["ctrl+alt+b"], "command": "upper_case" }, | |
| { "keys": ["ctrl+alt+l"], "command": "lower_case" }, | |
| { "keys": ["ctrl+f"], "command": "show_panel", "args": {"panel": "find", "reverse": false} }, | |
| { "keys": ["ctrl+1"], "command": "fold_by_level", "args": {"level": 1} }, | |
| { "keys": ["ctrl+2"], "command": "fold_by_level", "args": {"level": 2} }, | |
| { "keys": ["ctrl+3"], "command": "fold_by_level", "args": {"level": 3} }, |
| <?php | |
| namespace Base\View\Helper; | |
| /** | |
| * 视图助手 - 输出响应信息 | |
| * | |
| * 示例: | |
| * | |
| * $helper = new \Base\View\Helper\Message; |
| <?php | |
| /** | |
| * CLI 命令行函数 | |
| */ | |
| /** | |
| * 生成具有颜色的文本 | |
| * | |
| * @param string $text |