mayonnaise pgans:::xxokp=k9iuxx
ด้ามขวาน`::::::pgan::::::::xxxxgan2514XZZZZ
ร่มโพธิ์คำ :::::pgan::::::::xxxxgan2514XZZZZ
วันศุกร์ที่ 8 ธันวาคม พ.ศ. 2560
วันศุกร์ที่ 24 พฤศจิกายน พ.ศ. 2560
Error DHDC3 Config Internal Server Error 500
How to Fix HTTP error code “500 internal server error”
Table of Contents
- Introduction
- Refresh the Page
- Check Your Server Logs
- Check Permissions
- Examine Your Scripts
- Check the Apache Files
- Timeout Errors
Introduction
Learn how to fix the HTTP error code “500 internal server error.” This error means there is a problem on the server side. It is an all-purpose error, which means a serious problem is preventing your website from functioning.
Refresh the Page
วันพุธที่ 22 พฤศจิกายน พ.ศ. 2560
ปรับ ขนาดการ `import `ไฟล์ขนาดใหญ่ ผ่าน phpmyadmin `
ปรับ ขนาดการ `import `ไฟล์ขนาดใหญ่ ผ่าน phpmyadmin `
1- open php.ini using gedit or nano:
sudo gedit /etc/php5/apache2/php.ini
2- find 'upload_max_size' then replace this single line with these lines:
max_execution_time = 259200 max_input_time = 259200 memory_limit = 1000M upload_max_filesize = 750M post_max_size = 750M
3- save php.ini and close editor
4- restart apache2:
sudo service apache2 restart
5- now open
localhost://phpmyadmin/
in browser and uplaod your database.sql
https://stackoverflow.com/questions/9593128/cant-import-database-through-phpmyadmin-file-size-too-large/16960421
for ubuntu 14.04 use this:
https://stackoverflow.com/questions/9593128/cant-import-database-through-phpmyadmin-file-size-too-large/16960421
วันศุกร์ที่ 17 พฤศจิกายน พ.ศ. 2560
yii2 `ส่ง `Line Notify
`ใส่ใน `Controller `นะครับ
public function sendLine($model) {
$line_token = 'You Token';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"https://notify-api.line.me/api/notify");
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "message=".$model->name);ตรงนี้คือ`Field `ที่จะส่งข้อความไป`Line
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Content-type: application/x-www-form-urlencoded',
'Authorization: Bearer '.$line_token,
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$server_output = curl_exec ($ch);
curl_close ($ch);
}
`และตรงทีโฟสต์ `actionCreate
เพิ่ม
public function actionCreate()
{
$model = new Recommend();
if ($model->load(Yii::$app->request->post()) && $model->save()) {
Yii::$app->getSession()->setFlash('alert',[
'body'=>'ข้อเสนอแนะบันทึกเสร็จเรียบร้อย! เจ้าหน้าที่จะดำเนินการให้เร็วที่สุด....ขอบคุณค่ะ',
'options'=>['class'=>'alert-warning']
]);
//$this->sendLine($model);
$this->sendLine($model);`//`ส่ง `Line Notify
return $this->redirect(['create', 'id' => $model->id]);
return $this->redirect(['create', 'id' => $model->id]);
} else {
return $this->render('create', [
'model' => $model,
]);
}
}
`ขอขอบคุณ อาจารย์ มานพ กองอุ่น https://www.youtube.com/watch?v=YQKX2KedX5U&t=605s
public function sendLine($model) {
$line_token = 'You Token';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"https://notify-api.line.me/api/notify");
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "message=".$model->name);ตรงนี้คือ`Field `ที่จะส่งข้อความไป`Line
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Content-type: application/x-www-form-urlencoded',
'Authorization: Bearer '.$line_token,
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$server_output = curl_exec ($ch);
curl_close ($ch);
}
`และตรงทีโฟสต์ `actionCreate
เพิ่ม
public function actionCreate()
{
$model = new Recommend();
if ($model->load(Yii::$app->request->post()) && $model->save()) {
Yii::$app->getSession()->setFlash('alert',[
'body'=>'ข้อเสนอแนะบันทึกเสร็จเรียบร้อย! เจ้าหน้าที่จะดำเนินการให้เร็วที่สุด....ขอบคุณค่ะ',
'options'=>['class'=>'alert-warning']
]);
//$this->sendLine($model);
$this->sendLine($model);`//`ส่ง `Line Notify
return $this->redirect(['create', 'id' => $model->id]);
return $this->redirect(['create', 'id' => $model->id]);
} else {
return $this->render('create', [
'model' => $model,
]);
}
}
`ขอขอบคุณ อาจารย์ มานพ กองอุ่น https://www.youtube.com/watch?v=YQKX2KedX5U&t=605s
วันจันทร์ที่ 6 พฤศจิกายน พ.ศ. 2560
การเพิ่ม ฟิลด์ในตาราง user
ALTER TABLE `user` ADD enum('EMPLOYEE','USER','ADMIN') NOT NULL
- ROLE_USER เท่ากับ "USER" หมายถึง สิทธิ์สำหรับสมาชิกเท่านั้น
- ROLE_EMPLOYEE เท่ากับ "EMPLOYEE" หมายถึง สิทธิ์สำหรับพนักงานเท่านั้น
- ROLE_ADMIN เท่ากับ "ADMIN" หมายถึง สิทธิ์สำหรับผู้ดูแลระบบเท่านั้น
วันพุธที่ 23 สิงหาคม พ.ศ. 2560
`หาวัสดุคอมพิวเตอร์SQL
select a.ivt_id, b.ivt_name, sum(a.quantity) AS amount, d.uunit_name, avg(a.pack_price) AS avg_price from order_details a, inventory b, invoices c, ivt_units d where c.ivs_date between '2016.10.01' and '2017.09.30' and a.ivs_id = c.ivs_id and a.ivt_id = b.ivt_id and b.ivc_id = '04' and c.exp_id = '013' and a.uunit_id = d.uunit_id group by a.ivt_id order by b.ivt_name
วันพุธที่ 16 สิงหาคม พ.ศ. 2560
Active Form `ส่งตัวแปร ไปยัง`Action `ในController
$this->title = "DEP_REGIPD";
//$this->params['breadcrumbs'][] = ['label' => 'รายงาน', 'url' => ['reg/index']];
$this->params['breadcrumbs'][] = 'รายงานผู้ป่วยในแยกตามแผนก';
?>
<b style = "color:blue">รายงานผู้ป่วยในแยกตามแผนก</b>
<div class='well'>
<?php $form = ActiveForm::begin([
'method' => 'POST',
'action' => ['reg/depregipd'],
]); ?>
<?php
$items = ArrayHelper::map(MbIpdreg::find()->all(), 'UNIT_ID', 'UNIT_NAME');
echo Html::dropDownList('unitid', $unitid, $items, ['prompt' => '--- หน่วยบริการ ---']);
?>
//$this->params['breadcrumbs'][] = ['label' => 'รายงาน', 'url' => ['reg/index']];
$this->params['breadcrumbs'][] = 'รายงานผู้ป่วยในแยกตามแผนก';
?>
<b style = "color:blue">รายงานผู้ป่วยในแยกตามแผนก</b>
<div class='well'>
<?php $form = ActiveForm::begin([
'method' => 'POST',
'action' => ['reg/depregipd'],
]); ?>
<?php
$items = ArrayHelper::map(MbIpdreg::find()->all(), 'UNIT_ID', 'UNIT_NAME');
echo Html::dropDownList('unitid', $unitid, $items, ['prompt' => '--- หน่วยบริการ ---']);
?>
สมัครสมาชิก:
บทความ (Atom)