$_GET是Http Get方法的參數(shù),它在命令行模式下不可用,因?yàn)樗枰獁eb server來填充。
如果你非要用的話,可以在腳本前面加上
// bash command:
// export QUERY_STRING="var=value&arg=value" ; php -e myscript.php
parse_str($_SERVER['QUERY_STRING'], $_GET);
print_r($_GET);
或者不想改動腳本,這樣搞
php -e -r 'parse_str("id=1&type=2", $_GET); include "index.php";'
phpstorm + xdebug
xdebug 可以用斷點(diǎn)調(diào)試 也可以輸出日志分析 phpstorm有分析工具
如果你問的是為什么我用的是10000申請的QQ互聯(lián),別的QQ可以登錄,你需要了解oauth2的流程,QQ互聯(lián)也有接口文檔使用Authorization_Code獲取Access_Token
可以調(diào)用百度或者高德api逆向查詢經(jīng)緯度
好混亂。。。
先把
location ~ ^/index.php$ {
root /usr/local/etc/nginx/;
中的 root這樣去掉。 配置中root指的是網(wǎng)站根目錄,你寫這個是啥
已解決
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Demo extends CI_Controller {
public function index() {
$con=mysqli_connect("localhost","root","***","test");
//輸出中文可以加一句 mysqli_query($con,"SET NAMES utf8");
$query = mysqli_query($con,"select * from user");
$array = array();
while($row = mysqli_fetch_assoc($query)){
$array[] = $row;
}
echo json_encode($array);
}
}
session默認(rèn)配置文件讀寫。也可以設(shè)置存到memcache,redis。那么問題來了。一個用戶占多少個值,然后一個用戶大概需要占用到多少空間。如果同時(shí)在線人數(shù)不是很多,且session回收做好,其實(shí)用session來做是很合理的。
一次子查詢即可
"SELECT DISTINCT p.prod_id, p.icon FROM product AS p
JOIN product_order AS po ON p.prod_id = po.prod_id
JOIN user_order AS uo ON
po.order_id in (select order_id from PRODUCTTABLENAME)
AND
uo.id in (select user_id from PRODUCTTABLENAME)"
這樣一次查詢結(jié)果就出來了,然后遍歷輸出PRODUCTTABLENAME為你第一個循環(huán)查詢的表
name 命名有問題。變量Role是什么?
Route::get('/setting/myinfo',['middleware'=>'login','HomeController@myinfo']);
改為:Route::get('/setting/myinfo','HomeController@myinfo')->middleware('login');
以下是 5.5 創(chuàng)建路由的源碼:
protected function createRoute($methods, $uri, $action)
{
// If the route is routing to a controller we will parse the route action into
// an acceptable array format before registering it and creating this route
// instance itself. We need to build the Closure that will call this out.
if ($this->actionReferencesController($action)) {
$action = $this->convertToControllerAction($action);
}
$route = $this->newRoute(
$methods, $this->prefix($uri), $action
);
// If we have groups that need to be merged, we will merge them now after this
// route has already been created and is ready to go. After we're done with
// the merge we will be ready to return the route back out to the caller.
if ($this->hasGroupStack()) {
$this->mergeGroupAttributesIntoRoute($route);
}
$this->addWhereClausesToRoute($route);
return $route;
}
以后貼報(bào)錯圖的時(shí)候,關(guān)鍵的堆棧信息要貼出來的,不然很難幫助到你。
json_decode($json,true);
沒太懂你的要求
有人說命令行執(zhí)行,不會受限,我需要定時(shí)執(zhí)行這個php,可行么?怎么做?
crontab
*/10 * * * * php /path/test.php # 每10分鐘執(zhí)行一次
另外,你http請求等待120s,本身也不和邏輯啊,異步或者socket來做 。
提示的不是很清楚了吧, 現(xiàn)在memcached的根目錄下執(zhí)行 /usr/bin/phpize
phpize是什么?
phpize是用來擴(kuò)展php擴(kuò)展模塊的,通過phpize可以建立php的外掛模塊
比如你想在原來編譯好的php中加入memcached或者ImageMagick等擴(kuò)展模塊,可以使用phpize,通過以下幾步工作。
二、如何使用phpize?
當(dāng)php編譯完成后,php的bin目錄下會有phpize這個腳本文件。在編譯你要添加的擴(kuò)展模塊之前,執(zhí)行以下phpize就可以了;
比如現(xiàn)在想在php中加入memcache擴(kuò)展模塊:我們要做的只是如下幾步
復(fù)制代碼 代碼如下:
tar zxvf memcache-2.2.5.tgz
cd memcache-2.2.5/
/usr/local/webserver/php/bin/phpize
./configure –with-php-config=/usr/local/webserver/php/bin/php-config
make
make install
去看看它的源碼應(yīng)該會有所幫助
打印…?還是顯示…?
如果用 console.log()
打印的話就跟 Vue 一點(diǎn)關(guān)系都沒有,就是單純的 js 遍歷。
function traverse(array) {
array.forEach(item => {
if (item.checked) {
console.log(item.id)
}
if (item.children) {
traverse(item.children)
}
})
}
traverse(data)
1、如果你是在windows上操作,安裝xampp,把代碼部署進(jìn)去就可以了。
2、linux上則要安裝lnmp相關(guān)環(huán)境才可以。
H5+js+css
北大青鳥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
曾工作于聯(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é)及管理工作。
浪潮集團(tuán)項(xiàng)目經(jīng)理。精通Java與.NET 技術(shù), 熟練的跨平臺面向?qū)ο箝_發(fā)經(jīng)驗(yàn),技術(shù)功底深厚。 授課風(fēng)格 授課風(fēng)格清新自然、條理清晰、主次分明、重點(diǎn)難點(diǎn)突出、引人入勝。
精通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)師。