鍍金池/ 問答/ PHP問答
耍太極 回答

get 后臺當(dāng)然可以拿到數(shù)據(jù)啊,換個(gè)方法取而已

怪痞 回答

只匹配title 你可以在生成索引配置文件的時(shí)候只 寫一個(gè)查詢title的項(xiàng)目文件啊

雨萌萌 回答

$sql = "INSERT INTO table_student VALUES($stuId,$stuName,'$stuChinese','$stuMath','$stuEnglish')"; 中的$stuId,$stuName都是加上單引號試一試

安于心 回答

你的一維數(shù)組是否已經(jīng)排好序?
如果已經(jīng)排好,處理比較簡單,否則會比較麻煩。

任她鬧 回答

坑了!搞錯(cuò)了,沒啥特別的,網(wǎng)絡(luò)問題

孤毒 回答

因?yàn)?code>$_SERVER['REQUEST_METHOD'] != 'POST'

蝶戀花 回答

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)錯(cuò)圖的時(shí)候,關(guān)鍵的堆棧信息要貼出來的,不然很難幫助到你。

尛曖昧 回答

這跟curl沒啥關(guān)系吧,你瀏覽器打開域名估計(jì)也是連接斷的。

你再試試這個(gè)域名呢? https://okexcomweb.bafang.com/

擱淺 回答

語法錯(cuò)了啊。。。。比較多了或者少了一個(gè);都會報(bào)這個(gè)

乞許 回答

http://www.wangeditor.com/m/
這款是為手機(jī)開發(fā)的富文本
https://ckeditor.com/ckeditor-5/
這個(gè)可以用于手機(jī)
話說,你這是哪里的考試題?

貓小柒 回答

在 .net 系統(tǒng)里,通過http調(diào)用微生活給的接口就可以了,具體看文檔實(shí)際操作就可以了。

問題已經(jīng)解決,寫出答案方便后來的新手查看。
1.dd打印出來的代碼,仔細(xì)查看是可以看到有數(shù)據(jù)傳過來的。在控制器里echo可以直接顯示出來數(shù)據(jù)。
2.拿到數(shù)據(jù)后,直接使用構(gòu)造查詢器update更新,$res = DB:table('xxx')->where('id',$id)->update(['oid'=>$oid]);

喵小咪 回答

不會。
但是你這涉嫌掛羊頭賣狗肉,你通過審核的是備案過的,不知道小程序像不像工信部會定期查備案,如果定期查的話,你這有風(fēng)險(xiǎn)

抱緊我 回答

不要用 pusher,用 socket.io。并且用之前先了解下 socket.io 本身的用法,應(yīng)該就能成功了。

離魂曲 回答

你確定這個(gè)路徑是支持POST 請求的嗎? 對于很多框架REST請求是需要在路由下面設(shè)置的。你的程序有路由設(shè)定嗎?還有一些需要傳入JWT Token才能執(zhí)行POST請求。 我建議你把相關(guān)路徑通過console.log()打印出來,然后放到postman下面測試。這樣就能比較直接的的發(fā)現(xiàn)問題。

Postman使用教程

過客 回答

ConvertEmptyStringsToNull 中間件是 Laravel 5.4 才開始加入的。

By default, Laravel includes the TrimStrings and ConvertEmptyStringsToNull middleware in your application's global middleware stack. These middleware are listed in the stack by the AppHttpKernel class. These middleware will automatically trim all incoming string fields on the request, as well as convert any empty string fields to null. This allows you to not have to worry about these normalization concerns in your routes and controllers.
If you would like to disable this behavior, you may remove the two middleware from your application's middleware stack by removing them from the $middleware property of your AppHttpKernel class.

看官方描述的意思就是為了規(guī)范化數(shù)據(jù)。

如果你確實(shí)不想這樣處理,可以在 app/Http/Kernel.php 文件中注釋掉此 middleware

    /**
     * The application's global HTTP middleware stack.
     *
     * These middleware are run during every request to your application.
     *
     * @var array
     */
    protected $middleware = [
        \Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
        \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
        \App\Http\Middleware\TrimStrings::class,
        \Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class, //注釋掉此行
    ];

或者:

從數(shù)據(jù)庫層面,把 remark 字段的默認(rèn)值設(shè)置為 空字符串

她愚我 回答

把配置中的 host 在 localhost 和 127.0.0.1 換一下.

別的不需要改.

另外保證mysqld啟動.

這個(gè)問題和密碼權(quán)限無關(guān). 是php訪問Mysql的時(shí)候, 會使用 mysql.sock 這個(gè)文件. 這個(gè)配置在 mysql的my.cnf和php.ini中都要配置.

換個(gè)host的表示 方法就行了.

青瓷 回答

對的,我修改了代碼,注釋忘改了