鍍金池/ 問答/ PHP問答
若相惜 回答

你可以select md5(id) as id查出來就是id了

綰青絲 回答

if后面的else去掉,直接調(diào)用那個函數(shù)就行了!

莫小染 回答

我以前寫的TP框架多項目部分

我以前寫的,希望對你有幫助。

其實也就是/api/m=v=c=這種結(jié)構(gòu)了,只是TP框架不知道為什么用api命名有問題。我當時沒找出來~~~

青黛色 回答

你是要實現(xiàn)全選操作吧,這應(yīng)該是要添加JS來實現(xiàn),推薦一篇文章或許有幫助

我甘愿 回答

laravel官方提供了腳手架laravel/installer,也支持create-project快速創(chuàng)建項目,官網(wǎng)有很詳細的說明。

composer create-project --prefer-dist laravel/laravel blog

一般符合composer規(guī)則的項架,如果是自己的項目可以發(fā)布到packagist.org
如果是別人的項目并且他未發(fā)布composer包到packagist,可以添加repositories來指定源

"repositories": [
    {
      "type": "git",
      "url": "http://xxxx.git"
    }
  ]

你的截圖是因為你的composer.json文件語法錯誤。不知道如何配置可以直接把composer.json文件清空,只保留大括號

{}

使用composer require xxx/xxx的方式來安裝。

傲嬌范 回答

CodeIgniter一直在用,基本屬于0難度吧,直接上手那種。

離夢 回答

clipboard.png
product: 商品主表
option:屬性表,即顏色、尺碼、面料等
option_value:屬性值表,即紅色、藍色、L、M、S、純棉等
product_variant:商品SKU表
product_variant_option_value:商品SKU對應(yīng)的屬性值表

哎呦喂 回答
  1. codepan,是的 沒有寫錯.我最喜歡的
  2. Codepen
  3. jsbin
  4. jsfiddle
亮瞎她 回答
$me = $response->getGraphUser();
$pictureJson = $me->getPicture();
$pictureItem = json_decode($pictureJson,true);
echo $pictureItem['url'];

大概就是把這個json字符串轉(zhuǎn)換成PHP數(shù)組。然后再處理。

遲月 回答

使用關(guān)聯(lián)關(guān)系吧!簡潔又大方

model中寫:

public function articles() {
    return $this->hasMany(Articles::class,'uid','id');
}

查詢的時候直接就來了:

尐潴豬 回答
  1. 可以使用php mail擴展。按手冊添加相關(guān)配置之后調(diào)用

http://php.net/manual/zh/mail...

$to = "someone@example.com";         // 郵件接收者
$subject = "參數(shù)郵件";                // 郵件標題
$message = "Hello! 這是郵件的內(nèi)容。";  // 郵件正文
$from = "someonelse@example.com";   // 郵件發(fā)送者
$headers = "From:" . $from;         // 頭部信息設(shè)置
mail($to,$subject,$message,$headers);
echo "郵件已發(fā)送";

2.也可以使用phpmailer發(fā)送
https://github.com/PHPMailer/...

use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;

//Load Composer's autoloader
require 'vendor/autoload.php';

$mail = new PHPMailer(true);                              // Passing `true` enables exceptions
try {
    //Server settings
    $mail->SMTPDebug = 2;                                 // Enable verbose debug output
    $mail->isSMTP();                                      // Set mailer to use SMTP
    $mail->Host = 'smtp1.example.com;smtp2.example.com';  // Specify main and backup SMTP servers
    $mail->SMTPAuth = true;                               // Enable SMTP authentication
    $mail->Username = 'user@example.com';                 // SMTP username
    $mail->Password = 'secret';                           // SMTP password
    $mail->SMTPSecure = 'tls';                            // Enable TLS encryption, `ssl` also accepted
    $mail->Port = 587;                                    // TCP port to connect to

    //Recipients
    $mail->setFrom('from@example.com', 'Mailer');
    $mail->addAddress('joe@example.net', 'Joe User');     // Add a recipient
    $mail->addAddress('ellen@example.com');               // Name is optional
    $mail->addReplyTo('info@example.com', 'Information');
    $mail->addCC('cc@example.com');
    $mail->addBCC('bcc@example.com');

    //Attachments
    $mail->addAttachment('/var/tmp/file.tar.gz');         // Add attachments
    $mail->addAttachment('/tmp/image.jpg', 'new.jpg');    // Optional name

    //Content
    $mail->isHTML(true);                                  // Set email format to HTML
    $mail->Subject = 'Here is the subject';
    $mail->Body    = 'This is the HTML message body <b>in bold!</b>';
    $mail->AltBody = 'This is the body in plain text for non-HTML mail clients';

    $mail->send();
    echo 'Message has been sent';
} catch (Exception $e) {
    echo 'Message could not be sent. Mailer Error: ', $mail->ErrorInfo;
}
尐懶貓 回答

建議把 headers 也貼出來;

content download 指的是資源 網(wǎng)絡(luò)傳輸?shù)倪^程,從服務(wù)器到客戶端,影響這個時間的有 資源大小、客戶帶寬等因素。可以判斷下資源的體積是否過大,可以通過從根本上降低資源體積(減少量或者拆包),另外也可在服務(wù)端開啟 gzip 來壓縮傳輸文件的體積,以此來降低需要傳輸?shù)馁Y源大小,減少下載時間

款爺 回答

1保存數(shù)據(jù)庫
2保存一個文件如txt格式的文件

久愛她 回答
其實這個問題是我公司的同事遇到的,是因為他安裝了PHP7的圖形用戶界面(GUI) 擴展,哈哈!

解決方法為:將 php_ui.dll 復(fù)制到 PHP 的 ext 目錄下, 其余兩個文件 libui.dll 和 pthreadVC2.dll 

放到 PHP 的根目錄下,也就是與 php.exe 的同級目錄。詳細步驟請看:

https://blog.csdn.net/zhouzme/article/details/58601852
夢一場 回答

不要去到vendor目錄修改源碼,直接在App\Http\Auth\LoginController下重寫validateLogin方法即可,我的是laravel5.5版本不同可能會有略微差別。
至于驗證碼的,當然力薦mews/captcha
laravel中使用起來簡直不要太簡單。(多余的代碼就不寫了)

$this->validate($request, [
    'captcha' => 'required|captcha',
]);
初心 回答

出錯的原因是你按了CTRL+C,解決方法是別按CTRL+C

你如你是在Linux/Unix下,可以用 pcntl_signal()函數(shù)來處理中斷信號.收到信號時設(shè)置變量,讓你的死循環(huán)正常退出就好了.