php.ini沒什么改的。
主要是php-fpm的配置
pm = dynamic
pm.max_children = 20
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
內(nèi)存足夠大的情況下,計算一下每個子進(jìn)程會耗多少內(nèi)存,,我這個是設(shè)置比較低。
token生成后,每個請求都需要帶上的。
但沒有人規(guī)定,所有請求都是用post方法,比如RESTFul,不同的場景用不同的方法,不用header的話,客戶端和服務(wù)端的處理都很麻煩。
但這也不是絕對,早些年做移動互聯(lián)網(wǎng)的時候,某些地區(qū)的移動網(wǎng)關(guān)經(jīng)常會過濾或改寫header,這會帶來一些麻煩,如果真有碰到這種情況,就要想其它方式了。
謝邀
刪除索引.
ALTER TABLE `表名` DROP INDEX 索引名
查看的時候,可以直接通過以下語句
SHOW CREATE TABLE `表名`
或者
SHOW INDEX FROM `表名`
也可以用來實現(xiàn)php的協(xié)程多任務(wù)調(diào)度,具體可以看鳥哥的博客
在PHP中使用協(xié)程實現(xiàn)多任務(wù)調(diào)度
加 --no-check-certificate
參數(shù)
我對問題的理解是:vue的history模式如何在iis中發(fā)布
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.web>
<customErrors mode="On" defaultRedirect="index.html">
<error statusCode="404" redirect="index.html" />
</customErrors>
</system.web>
<system.webServer>
<httpErrors errorMode="Custom">
<remove statusCode="404" />
<remove statusCode="500" />
<error statusCode="500" path="/index.html" responseMode="ExecuteURL" />
<error statusCode="404" path="/index.html" responseMode="ExecuteURL" />
</httpErrors>
</system.webServer>
</configuration>
location /xxx {
try_files $uri $uri/ /xxx/index.php?$query_string;
}
遇到這種情況,我之前的問題是,加載圖片資源的路徑寫錯,導(dǎo)致每次點擊都發(fā)起了兩次請求
這種情況解決辦法:查看nginx、或者apache日志,看看到底發(fā)起了什么請求,或者看看firebug
用PHPunit做單元測試,單元測試如果能覆蓋完全上線前跑一次單元測試基本能鎖定有沒有問題,也就是可以做自動化測試了,整個思想主要是圍繞:
基于數(shù)據(jù)流動的思想,也就是說程序包含的三個部分:“輸入、處理邏輯、輸出”
驗證數(shù)據(jù)輸入以及輸出是否是你所想,基本就能確定程序是否正確了,具體的我給個鏈接:
http://www.phpunit.cn/
服務(wù)器沒有配置好吧
文件不存在或無權(quán)限訪問
location ^~ /qr {
alias /Users/whj/web/qr/public;
try_files $uri $uri/ @qr;
index index.php index.html index.htm;
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/tmp/php-cgi.sock;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME /Users/whj/web/qr/public/index.php;
}
}
location @qr {
rewrite /qr/(.*)$ /qr/index.php?/$1 last;
}
這是我localhost下子目錄qr的nginx配置,你可以參考下
開發(fā)版也能顯出小程序碼。
地址欄跟官方一樣https://api.weixin.qq.com/wxa...;
傳遞的參數(shù)必須是json格式,因為是用postman測試的,數(shù)據(jù)必須要注意標(biāo)點符號。
例:{"data":"xxx"}
選擇post方法 參數(shù)選擇raw 點擊切換成application/json的header
跳轉(zhuǎn)到小程序頁面沒弄出來 報錯顯示頁面沒注冊 還在摸索
沒發(fā)現(xiàn)有項配置。
思路:
實現(xiàn):
$numbers = ['17', '38', '12', '40', '20', '47', '45', '22', '02', '19', '29', '10', '27', '41', '26', '47', '18', '24', '22', '27', '33', '47', '25', '09', '16', '32', '01', '28', '18', '38'];
// 單雙數(shù)組
$oddEven = ['1', '2', '2', '2', '2', '1', '1', '2', '2', '1', '1', '2', '1', '1', '2', '1', '2', '2', '2', '1', '1', '1', '1', '1', '2', '2', '1', '2', '2', '2'];
$oddEvenStrs = implode("", $oddEven);
// 匹配數(shù)組
$matchArr = ['1', '2', '2', '2'];
$matchArrStrs = implode("", $matchArr);
var_dump($oddEvenStrs);
var_dump($matchArrStrs);
var_dump(count($numbers));
function findIt($from, $find, $numbers, $pos)
{
$result = '';
$pos = strpos($from, $find, $pos);
if ($pos !== false) {
$result .= implode(",", array_slice($numbers, $pos, 4));
$pos += 4;
}
if (count($numbers) > $pos)
{
return $result . "," . findIt($from, $find, $numbers, $pos);
}
return $result;
}
$result = findIt($oddEvenStrs, $matchArrStrs, $numbers, 0);
echo $result;
var_dump(explode(",", $result));
header包含的數(shù)據(jù)格式是key-value
在頁面可以使用ajax設(shè)置值:xhr.setRequestHeader('k', 'v');
看一下這三個用法,用特別的符號處理,
你如果是中文的話就用正則替換吧
$str = 'A:"How are you" B:"I am fine", "';
echo $str."\n";
$str = preg_replace('/"([^"]*)"/', '“${1}”', $str);
echo $str."\n";
crtl + shift + p 輸入liveReload 點擊下是看看,我之前也是這個問題
監(jiān)聽127.0.0.1就好了。ddos和這個沒關(guān)系,要看具體是ddos什么
北大青鳥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)項目經(jīng)理。精通Java與.NET 技術(shù), 熟練的跨平臺面向?qū)ο箝_發(fā)經(jīng)驗,技術(shù)功底深厚。 授課風(fēng)格 授課風(fēng)格清新自然、條理清晰、主次分明、重點難點突出、引人入勝。
曾工作于聯(lián)想擔(dān)任系統(tǒng)開發(fā)工程師,曾在博彥科技股份有限公司擔(dān)任項目經(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)驗。曾經(jīng)歷任德國Software AG 技術(shù)顧問,美國Dachieve 系統(tǒng)架構(gòu)師,美國AngelEngineers Inc. 系統(tǒng)架構(gòu)師。