估計(jì)還是路徑問題
翻了一下源碼,沒有相關(guān)的方法。
好奇為啥有這樣的需求,最好說明業(yè)務(wù)需求情況,再來想解決方案比較合適。
$new_arr=array_column($tags,0,1);
先查看在chrome下是否被當(dāng)成廣告了
把拉取順序倒置一下,在生成消息模板的時候,就預(yù)先把要接收的用戶分發(fā)出去;
生成message_content
表數(shù)據(jù),要選擇下發(fā)的用戶,選完用戶可以把這些用戶ID存放在redis
中,然后用戶上線的時候,從redis中讀取,有數(shù)據(jù)就給提示,用戶已查看,就刪除,然后存入message
表。
(如果不用redis,直接插入message
表也行,只需要插入message_content_id
和user_id
就可以了,讀取狀態(tài)字段在數(shù)據(jù)表中默認(rèn)設(shè)置為0未查看,然后采用批量插入的方式,也挺快的)
結(jié)合一下 @lscho 的數(shù)據(jù)表設(shè)計(jì)就差不多了。
以上推送模式都有一個缺點(diǎn):就是消息模板不能實(shí)時推送給用戶,必須要用戶下次登陸或者觸發(fā)某個頁面,才能得到消息。workerman的消息推送框架了解一下
問題是出現(xiàn)了phpmyadmin的2002錯誤,無法登錄 MySQL 服務(wù)器
1、可能因?yàn)閙ysqld沒有啟動
2、phpmyadmin中將config.sample.inc.php復(fù)制成config.inc.php (參考http://www.jb51.net/article/3...)
將$cfg['Servers'][$i]['host'] = 'localhost';
改為$cfg['Servers'][$i]['host'] = '127.0.0.1';
一樣的,都是用于url的編碼
php中暫時還不支持Set這種數(shù)據(jù)結(jié)構(gòu),所以可以考慮使用array來實(shí)現(xiàn)
<?php
Class Set {
private $arr = [];
public function add($val) {
if (!in_array($val, $this->arr)) {
array_push($this->arr, $val);
}
return $this->arr;
}
}
$set = new Set();
print_r($set->add(2));
print_r($set->add(2));
print_r($set->add(3));
print_r($set->add(4));
能力有限,如果有錯誤希望不吝指教.
看你問了好幾個 draft-js 的問題,難道你使用之前不看官方文檔嗎?https://draftjs.org/docs/over...
如果把root和index 兩行 放到 location / 里面 證書就是綠色的,沒問題, 如果把root和index 放到 ocation /外面 證書就不灰色的,就不行了
php也可以直接實(shí)現(xiàn),但是用前端方法的話用ajax去請求數(shù)據(jù)就行了,具體流程:
1.提交表單時ajax提交數(shù)據(jù)到服務(wù)器;
2.每次網(wǎng)站打開時,向服務(wù)器請求一次數(shù)據(jù),然后將數(shù)據(jù)用字符串拼接的方式插入網(wǎng)頁。
如果需要提交表單后就展示新增“卡片”,在ajax回調(diào)中實(shí)現(xiàn)字符串拼接并插入就行了。
1.模擬后端開發(fā),拉后端代碼。(要后端代碼,沒坑,效率低)
2.前端開啟web服務(wù)器,node服務(wù)器或者nginx服務(wù)器。(前端自由,不用管后端)
node服務(wù)器:
proxyTable: {
'/api': {
target: 'http://segmentfault.com',
pathRewrite: {
'^/api': ''
}
}
}
1.比如ajax接口"/getMessage",本地"localhost:8080/getMessage",有跨域的問題。
2.localhost:8080 => http://segmentfault.com,本地開啟服務(wù)器實(shí)現(xiàn)代理。
nginx服務(wù)器:
http {
server {
listen 8080; #本地端口
server_name localhost;
location ~*/get*|post* { #nginx正則匹配(可高度自定義)
proxy_pass http://segmentfault.com; #反向代理
}
}
}
1.比如ajax接口"/getMessage",本地"localhost:8080/getMessage",有跨域的問題。
2.localhost:8080 => http://segmentfault.com,本地開啟服務(wù)器實(shí)現(xiàn)代理。
3.nginx反向代理更多配置查詢http://www.nginx.cn/115.html。
function totalLen(...$string){
$lens = [];
foreach ($string as $content) {
$lens[] = strlen($content);
}
reutrn $lens;
}
在mysql官網(wǎng)上看到的
On the other hand, you should not use mysql_use_result() for locking reads if you are doing a lot of processing for each row on the client side, or if the output is sent to a screen on which the user may type a ^S (stop scroll). This ties up the server and prevent other threads from updating any tables from which the data is being fetched.
首先看你直接輸出了,典型的 PHP_FPM
沒執(zhí)行,將其當(dāng)文件了,問題出在這里,我看一下你的DockerFile
或者docker-compose.yml
這里我覺得有點(diǎn)問題,你直接將其代理到這個IP去了,你在docker里設(shè)這個IP了嗎?
if (!-e $request_filename) {
proxy_pass http://192.168.10.2:1215;
}
兄弟,有個地方不對,你第二次篩選出來的結(jié)果應(yīng)該賦值回去才對~
你的代碼:
$collect = collect($arr)
->whereInStrict('rule', $rule)
->map(function ($value) use ($rule) {
return collect($value['children'])->whereInStrict('rule', $rule);
});
修改:
$collect = collect($arr)
->whereInStrict('rule', $rule)
->map(function ($value) use ($rule) {
$value['children'] = collect($value['children'])->whereInStrict('rule', $rule)
->toArray(); //此處要賦值回去,而且要把結(jié)果轉(zhuǎn)為數(shù)組
return $value;
});
這樣的結(jié)果就是你想要的,總體思路沒毛病~
你的php-fpm如果是官方鏡像,php-fpm用戶組應(yīng)該是www-data
編輯你的Dockerfile
FROM php:7.0-fpm
RUN chown -R www-data 你的WEB目錄
你這報錯了啊,微信后臺配置了沒有
把 /去掉, 換成about
最好是 再去熟悉一邊 vue-router 文檔 和demo
將用戶下單的時間加上24小時(失效時間)轉(zhuǎn)成時間戳傳到后臺,然后起24小時的定時器;
頁面刷新去后臺取失效時間和當(dāng)前時間的差起定時器...
北大青鳥APTECH成立于1999年。依托北京大學(xué)優(yōu)質(zhì)雄厚的教育資源和背景,秉承“教育改變生活”的發(fā)展理念,致力于培養(yǎng)中國IT技能型緊缺人才,是大數(shù)據(jù)專業(yè)的國家
北大青鳥中博軟件學(xué)院創(chuàng)立于2003年,作為華東區(qū)著名互聯(lián)網(wǎng)學(xué)院和江蘇省首批服務(wù)外包人才培訓(xùn)基地,中博成功培育了近30000名軟件工程師走向高薪崗位,合作企業(yè)超4
中公教育集團(tuán)創(chuàng)建于1999年,經(jīng)過二十年潛心發(fā)展,已由一家北大畢業(yè)生自主創(chuàng)業(yè)的信息技術(shù)與教育服務(wù)機(jī)構(gòu),發(fā)展為教育服務(wù)業(yè)的綜合性企業(yè)集團(tuán),成為集合面授教學(xué)培訓(xùn)、網(wǎng)
達(dá)內(nèi)教育集團(tuán)成立于2002年,是一家由留學(xué)海歸創(chuàng)辦的高端職業(yè)教育培訓(xùn)機(jī)構(gòu),是中國一站式人才培養(yǎng)平臺、一站式人才輸送平臺。2014年4月3日在美國成功上市,融資1
浪潮集團(tuán)項(xiàng)目經(jīng)理。精通Java與.NET 技術(shù), 熟練的跨平臺面向?qū)ο箝_發(fā)經(jīng)驗(yàn),技術(shù)功底深厚。 授課風(fēng)格 授課風(fēng)格清新自然、條理清晰、主次分明、重點(diǎn)難點(diǎn)突出、引人入勝。
曾工作于聯(lián)想擔(dān)任系統(tǒng)開發(fā)工程師,曾在博彥科技股份有限公司擔(dān)任項(xiàng)目經(jīng)理從事移動互聯(lián)網(wǎng)管理及研發(fā)工作,曾創(chuàng)辦藍(lán)懿科技有限責(zé)任公司從事總經(jīng)理職務(wù)負(fù)責(zé)iOS教學(xué)及管理工作。
精通HTML5和CSS3;Javascript及主流js庫,具有快速界面開發(fā)的能力,對瀏覽器兼容性、前端性能優(yōu)化等有深入理解。精通網(wǎng)頁制作和網(wǎng)頁游戲開發(fā)。
具有10 年的Java 企業(yè)應(yīng)用開發(fā)經(jīng)驗(yàn)。曾經(jīng)歷任德國Software AG 技術(shù)顧問,美國Dachieve 系統(tǒng)架構(gòu)師,美國AngelEngineers Inc. 系統(tǒng)架構(gòu)師。