wangEditor for Laravel
继发布 editor.md for Laravel ,本人再次整合 wangEditor 。wangEditor 基于javascript和css开发的 Web富文本编辑器, 轻量、简洁、易用、开源免费。官方网站:http://www.wangeditor.com/ 。
传送门:https://github.com/douyasi/laravel-wang-editor
截图:

继发布 editor.md for Laravel ,本人再次整合 wangEditor 。wangEditor 基于javascript和css开发的 Web富文本编辑器, 轻量、简洁、易用、开源免费。官方网站:http://www.wangeditor.com/ 。
传送门:https://github.com/douyasi/laravel-wang-editor
截图:

传送门: https://github.com/douyasi/laravel-editor-md
editor.md是一款高度可定制化的markdown编辑器,官方网站:https://pandao.github.io/editor.md/ 。
本扩展包经过测试,适配 Laravel 5.1 以上稳定版本(5.0 版本理论上也是可行的,但未经测试)。
特别说明:
composer分析某些依赖时可能会出现问题:比如在Laravel 5.2主项目中,安装本扩展包,可能会装上5.3版本的illuminate/support与illuminate/contracts相关依赖包,这样可能会造成5.2主项目出现错误。为此,本包在composer.json特别移除对"illuminate/support": "~5.1"的依赖。
基于
flight与medoo构建的微型php框架。
类似于 Laravel 项目的安装,设置服务器网站根目录到 public 文件夹,并使用 composer 来安装或更新依赖包等等操作。您可以在终端窗口执行以下命令来完成:
git clone https://github.com/ycrao/tinyme.git tinyme.dev
cd tinyme.dev
cp .env.example .env
vim .env
composer install
cd app
chmod -R 755 storage演示站: http://tinyme.yas.so 。
Laravel 框架侦测浏览器语言偏好,某些情况下存在 BUG ,它依赖于 Symfony\Component\HttpFoundation\Request 的 getPreferredLanguage 方法。
问题主要表现为:在优先简体中文(其它非英语也有可能)偏好(Accept-Language:zh-CN,zh;q=0.8,en;q=0.6,zh-TW;q=0.4)的Chrome 浏览器下,仍会返回英文,即使存在可用的简体中文语言版本。在 stackoverflow 网站上有相关问题的讨论,部分答者建议使用不同语言对应不同 url 的方案。
有时候我们需要跟安全的 https 网站交互,获取对方内容,如果使用 curl 需要设置额外的选项。
下面给出php示例代码:
其中
cacert.pem根CA证书文件可以去http://curl.haxx.se/docs/caextract.html下载。
$url = 'https://github.com/';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
// Set so curl_exec returns the result instead of outputting it.
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
//verify ssl server
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
//set CA Certs file path
curl_setopt($ch, CURLOPT_CAINFO, '/home/ssl/cacert.pem');
// Get the response and close the channel.
$response = curl_exec($ch);
curl_close($ch);
return $response;