原创 javascript 樹形數據轉化維數組

javascript 樹形數據轉化維數組 廢話不多說直接上代碼。 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>遍歷樹<

原创 windows 7 下安裝多個 apache服務

windows 7 下安裝多個 apache 服務 下載 apache 選擇apache版本 http://www.apachehaus.com/cgi-bin/download.plx 如下,我選擇的是Apache2.4.2

原创 mysql 中 You can't specify target table for update in FROM clause 錯誤解決方法

You can’t specify target table tbl for update in FROM clause 在mysql中當在一句sql中先後執行對同一張表的select 和 update 或 delete 操作時,

原创 laravel php artisan 錯誤

laravel php artisan 錯誤 當運行 php artisan 的任意命令時出現如下錯誤時: [RuntimeException]

原创 laragon 使用php5.* Service Apache can not start. Reason

Service Apache can not start. Reason *laragon 2.1. 默認使用 php7.*, 當切換php版本到php5 就會出現 Service Apache can not start.

原创 javascript 對象數組不確定對象屬性名遍歷問題

javascript 對象數組不確定對象屬性名遍歷問題 有時候會莫名其妙的遇到一些奇怪的問題,就比如: javascript 對象數組不確定對象屬性名遍歷問題,本來拿到對象就可以了,可是對一些 “強迫症” 來說就要這麼做沒辦法。下

原创 YII2 beforeSave not work?

YII2 中 beforeSave 不執行問題分析 首先了解一下 YII2 Model的執行流程: 初始化Model 給Model賦值 Model 數據驗證 執行save操作 beforeSave() 是在調用 save()

原创 Laragon下添加新版本Python

Laragon下添加新版本Python 在 https://www.python.org/ 下載所需要的Python版本安裝包 Windows x86-64 executable installer 雙擊安裝,取消下面的多選框,

原创 win 7 安裝redis服務

win 7 安裝redis服務 Redis是一個開源的使用ANSI C語言編寫、支持網絡、可基於內存亦可持久化的日誌型、Key-Value數據庫,並提供多種語言的API。但是Redis官方是不支持windows的,只是 Micro

原创 YII Insert or Update a Row

// try to find a row $model = someModel::find() ... ->one(); // if exist a row, return the model // otherw

原创 This is usually because the "vboxsf" file system is not available.

windows 安裝homestead 錯誤 問題 運行 vagrant up 時出現: Failed to mount folders in Linux guest. This is usually because the “

原创 全棧式PHP集成環境-laragon(二) 配置、使用

全棧式PHP集成環境-laragon(二) 配置、使用 配置啓動項和端口 Laragon 中集成了 Apache, MySQL, Nginx, Memcahed, Redis 我們可以按照自己的需要配置啓動這些服務。 1 啓動La

原创 php array to string

php array to string 在之前的一個項目中,遇到需要把一個多維數組轉化爲符合php語法的字符串保存到php文件中的問題,開始百度了一大堆東西都沒什麼用。於是自己就琢磨了一個方法,望大家多多指正。 需求如下 $a =

原创 RabbitMQ教程之php-amqplib(一)安裝RabbitMQ

Installing on Debian / Ubuntu 添加 /etc/apt/preferences.d/erlang # /etc/apt/preferences.d/erlang Package: erlang* P

原创 JavaScript 刪除數組中一個元素--delete與賦值爲undefined方法比較

JavaScript 刪除數組中一個元素–delete與賦值爲undefined方法比較 delete 刪除數組一個元素 delete 刪除數組的一個元素,將會把數組中該元素對應的索引一起刪除, 但是數組的長度不會改變。 var