Time of Update: 2016-06-20
本文經授權轉自 PHPHub 社區 說明 maatwebsite/excel 是一款強大的 Excel 檔案處理擴充包, 能夠快速完成 Excel 檔案的的匯出, 解析等功能. 本項目由 The EST Group 團隊成員 @monkey 整理髮布, 首發地為 PHPHub 社區. 文章的 DEMO 項目 運行 Demo 代碼請見:
Time of Update: 2016-06-20
Easy WeChat 可能是目前最優雅的公眾平台 SDK 了。 不支援企業號,也不打算支援,原因?的API實在設計得太亂了,我怕累死。。。 SDK 使用交流 QQ 群: 319502940 開發人員交流 QQ 群: 9179779 特點 命名不那麼亂七八糟; 隱藏開發人員不需要關注的細節; 方法使用更優雅,不必再去研究那些奇怪的的方法名或者類名是做啥用的;
Time of Update: 2016-06-20
問題起由:PHP中if(true==2)會返回true還是false? 結果是返回true,順著這個問題,我把php其他資料類型也測試一下。 結論: 轉化為bool類型時,會變成false的幾種資料: 1.整型0 2.Null 字元串 3.空數組 4.NULL 歡迎補充... 測試代碼: function p($title,$mybool){ echo "".$title; echo
Time of Update: 2016-06-20
Entrust為我們在Laravel中實現基於角色的許可權管理(RBAC)提供了簡潔靈活的方式。 1、 安裝 想要在Laravel中使用Entrust,首先需要通過Composer來安裝其依賴包: composer require zizaco/entrust 5.2.x-dev 安裝完成後需要在 config/app.php中註冊服務提供者到 providers數組: Zizaco\Entrust\EntrustServiceProvider::class,
Time of Update: 2016-06-20
參數修改: 'simulation', 1,$sAuthUser = utils::ReadParam('auth_user', 'user_name', true);$sAuthPwd = utils::ReadParam('auth_pwd', 'user_pass', true);// Configuration of the Active Directory connection 'host' => '192.168.**.**',
Time of Update: 2016-06-20
行 51: 行 51: 以上這些常用的舉措可以給Apache Server 一個基本的安全運行環境,顯然在具體實施上還要做進一步的細化分解,制定出符合實際應用的安全配置方案。 以上這些常用的舉措可以給Apache Server 一個基本的安全運行環境,顯然在具體實施上還要做進一步的細化分解,制定出符合實際應用的安全配置方案。 -
Time of Update: 2016-06-20
1、laravel實現的生產環境跟開發環境配置分離
Time of Update: 2016-06-20
有時候在文章詳情頁需要實現顯示 上一篇/下一篇 的功能。這個功能非常的常見,現在分享下如何在 Laravel 中實現這樣的功能。 首先需要在 Controller中顯示文章的方法(如: show())中查詢出上一條/下一條記錄: public function show($id){ // get the current post $post = Post::find($id); // get previous post id $previous =
Time of Update: 2016-06-20
B表 id title 1 你好 2 我好 3 大家好 $arr =你好,我好,大家好;中間是逗號隔開 然後我想通過$arr的值 查詢B表 對應的title的id 怎麼寫查詢? 效果大概是這樣: $arr =你好,我好,大家好; SELECT * FROM B表 WHERE title=$arr 輸出結果為: 你好我的id為1 我好我的id為2 大家好我的id為3
Time of Update: 2016-06-20
最近有人跟我反映主機上一個wordpress外掛程式的使用過程中經常會出現錯誤,開啟了php的dispaly_error功能之後,發現其報“Fatal error: Allowed memory size of 35389440 bytes exhausted(tried to allocate 1406507 bytes) in xxxxxx on line
Time of Update: 2016-06-20
CakePHP 3.2.6 發布了。CakePHP 是一個運用了諸如ActiveRecord、Association Data Mapping、Front Controller和MVC等著名設計模式的快速開發架構。該項目主要目標是提供一個可以讓各種層次的PHP開發人員快速地開發出健壯的Web應用,而 又不失靈活性。主要特性: 基於MVC架構 視圖支援Ajax 內建校正架構 提供應用程式的基礎模組和CRUD 代碼自動產生功能
Time of Update: 2016-06-20
18. 將工具函數封裝到類中 假如你在某檔案中定義了很多工具函數: function utility_a() { //This function does a utility thing like string processing } function utility_b() { //This function does nother utility thing like database processing }
Time of Update: 2016-06-20
查詢sql獲得5條資料,我想把獲得的這5條資料以以下方式表現,該什麼弄呢? 想要達到的效果如下: arr={你好,我好,大家好,很好,太好了}; foreach arr 後怎麼達到下面的輸出效果? 你好 我好 大家好 很好 太好了 回複討論(解決方案) $arr = array('你好', '我好', '大家好', '很好',
Time of Update: 2016-06-20
1. 參考的這個網址 https://github.com/luofei614/SocketLog 其中有提到 安裝服務端npm install -g socketlog-server , 運行命令 socketlog-server 即可啟動服務。 將會在本地起一個websocket服務 ,監聽連接埠是1229 。 如果想服務後台運行: socketlog-server > /dev/null & 我們提供公用的服務端,需要去申請client_id : http:
Time of Update: 2016-06-20
這樣寫的三個if句,不是引用檔案 吧?我的理解是判斷有沒有,但不是引用! 如果不是引用的話,那這三個檔案中的方法或設定啥的都沒有引過來,比如它裡面的函數或是變數常量啥的都沒有引過來,還是不能用!不知這麼理解對嗎 if (!@include(dirname(dirname(__FILE__)).'/global.php')) exit('global.php isn\'t exists!');if (!@include(BASE_PATH.'/control/control.php'
Time of Update: 2016-06-20
實現 /* reimplement fopen using stream */ZEND_FUNCTION(donie_stream_fopen){ php_stream *stream; char *path, *mode; int path_len, mode_len; int options = ENFORCE_SAFE_MODE|REPORT_ERRORS; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "
Time of Update: 2016-06-20
背景資料是這樣子的 array(2) { [0] => array(4) { ["pid"] => string(1) "0" ["id"] => string(1) "1" ["name"] => string(9) "江西省" ["son"] => array(2) { [0] => array(3) { ["pid"] => string(1) "1" ["id"] => string(1) "2"
Time of Update: 2016-06-20
php後門木馬常用的函數大致上可分為四種類型: 1. 執行系統命令: system, passthru, shell_exec, exec, popen, proc_open2. 代碼執行與加密: eval, assert, call_user_func,base64_decode, gzinflate, gzuncompress, gzdecode, str_rot133. 檔案包含與產生: require, require_once, include, include_once,
Time of Update: 2016-06-20
public function getmicrotime() { list($usec, $sec) = explode(" ",microtime()); //return ((float)$usec + (float)$sec); return date('ymdHis').$usec *1000000; } 我是用這個精確到微秒的時間做訂單編號。但是發現有時候會少一位,是怎麼回事呢。 謝謝
Time of Update: 2016-06-20
##入門 1.下載PHP源碼(我的版本是5.6.13) 2.常規編譯安裝 [可以看我以前的blog](http://my.oschina.net/lwl1989/blog/511295) 3.使用ext_skel ``` cd phpsrc/ext ./ext_skel --extname=name // name 是指你要寫得擴充的名字,下文我們都是t2 ```出現提示```1. $ cd ..2. $ vi