A PHP Error was encountered

Severity: Warning

Message: Declaration of Administrator::insert() should be compatible with MY_Model::insert($data, $temp_key = NULL)

Filename: system/Administrator.php

Line Number: 259

Backtrace:

File: /home2/beta/public_html/lupopi/application/models/system/BackPlatform.php
Line: 8
Function: model

File: /home2/beta/public_html/lupopi/application/controllers/Blog.php
Line: 7
Function: __construct

File: /home2/beta/public_html/lupopi/index.php
Line: 317
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: Declaration of Administrator::update($idx) should be compatible with MY_Model::update($idx, $data)

Filename: system/Administrator.php

Line Number: 281

Backtrace:

File: /home2/beta/public_html/lupopi/application/models/system/BackPlatform.php
Line: 8
Function: model

File: /home2/beta/public_html/lupopi/application/controllers/Blog.php
Line: 7
Function: __construct

File: /home2/beta/public_html/lupopi/index.php
Line: 317
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: Declaration of Menu::insert() should be compatible with MY_Model::insert($data, $temp_key = NULL)

Filename: system/Menu.php

Line Number: 82

Backtrace:

File: /home2/beta/public_html/lupopi/application/models/system/BackPlatform.php
Line: 9
Function: model

File: /home2/beta/public_html/lupopi/application/controllers/Blog.php
Line: 7
Function: __construct

File: /home2/beta/public_html/lupopi/index.php
Line: 317
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: Declaration of Menu::update($idx) should be compatible with MY_Model::update($idx, $data)

Filename: system/Menu.php

Line Number: 95

Backtrace:

File: /home2/beta/public_html/lupopi/application/models/system/BackPlatform.php
Line: 9
Function: model

File: /home2/beta/public_html/lupopi/application/controllers/Blog.php
Line: 7
Function: __construct

File: /home2/beta/public_html/lupopi/index.php
Line: 317
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: Declaration of MenuCategory::insert() should be compatible with MY_Model::insert($data, $temp_key = NULL)

Filename: system/MenuCategory.php

Line Number: 58

Backtrace:

File: /home2/beta/public_html/lupopi/application/models/system/Menu.php
Line: 29
Function: model

File: /home2/beta/public_html/lupopi/application/models/system/BackPlatform.php
Line: 9
Function: model

File: /home2/beta/public_html/lupopi/application/controllers/Blog.php
Line: 7
Function: __construct

File: /home2/beta/public_html/lupopi/index.php
Line: 317
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: Declaration of MenuCategory::update($idx) should be compatible with MY_Model::update($idx, $data)

Filename: system/MenuCategory.php

Line Number: 68

Backtrace:

File: /home2/beta/public_html/lupopi/application/models/system/Menu.php
Line: 29
Function: model

File: /home2/beta/public_html/lupopi/application/models/system/BackPlatform.php
Line: 9
Function: model

File: /home2/beta/public_html/lupopi/application/controllers/Blog.php
Line: 7
Function: __construct

File: /home2/beta/public_html/lupopi/index.php
Line: 317
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: Declaration of Logo::upload_image($sub_idx) should be compatible with MY_Model::upload_image($idx, $temp_key = NULL)

Filename: system/Logo.php

Line Number: 100

Backtrace:

File: /home2/beta/public_html/lupopi/application/models/system/BackPlatform.php
Line: 12
Function: model

File: /home2/beta/public_html/lupopi/application/controllers/Blog.php
Line: 7
Function: __construct

File: /home2/beta/public_html/lupopi/index.php
Line: 317
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: Declaration of Logo::delete_image($sub_idx = NULL) should be compatible with MY_Model::delete_image($idx, $temp_key = NULL)

Filename: system/Logo.php

Line Number: 119

Backtrace:

File: /home2/beta/public_html/lupopi/application/models/system/BackPlatform.php
Line: 12
Function: model

File: /home2/beta/public_html/lupopi/application/controllers/Blog.php
Line: 7
Function: __construct

File: /home2/beta/public_html/lupopi/index.php
Line: 317
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: Declaration of SEO::insert($property, $property_idx, $data) should be compatible with MY_Model::insert($data, $temp_key = NULL)

Filename: system/SEO.php

Line Number: 129

Backtrace:

File: /home2/beta/public_html/lupopi/application/controllers/Blog.php
Line: 7
Function: __construct

File: /home2/beta/public_html/lupopi/index.php
Line: 317
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: Declaration of SEO::update($property, $property_idx, $data) should be compatible with MY_Model::update($idx, $data)

Filename: system/SEO.php

Line Number: 151

Backtrace:

File: /home2/beta/public_html/lupopi/application/controllers/Blog.php
Line: 7
Function: __construct

File: /home2/beta/public_html/lupopi/index.php
Line: 317
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: Declaration of SiteInfo::get() should be compatible with MY_Model::get($idx)

Filename: system/SiteInfo.php

Line Number: 24

Backtrace:

File: /home2/beta/public_html/lupopi/application/controllers/Blog.php
Line: 7
Function: __construct

File: /home2/beta/public_html/lupopi/index.php
Line: 317
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: Declaration of SiteInfo::update() should be compatible with MY_Model::update($idx, $data)

Filename: system/SiteInfo.php

Line Number: 37

Backtrace:

File: /home2/beta/public_html/lupopi/application/controllers/Blog.php
Line: 7
Function: __construct

File: /home2/beta/public_html/lupopi/index.php
Line: 317
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: Declaration of Google::update() should be compatible with MY_Model::update($idx, $data)

Filename: system/Google.php

Line Number: 34

Backtrace:

File: /home2/beta/public_html/lupopi/application/controllers/Blog.php
Line: 7
Function: __construct

File: /home2/beta/public_html/lupopi/index.php
Line: 317
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: Declaration of Article::insert() should be compatible with MY_Model::insert($data, $temp_key = NULL)

Filename: customize/Article.php

Line Number: 257

Backtrace:

File: /home2/beta/public_html/lupopi/application/controllers/Blog.php
Line: 8
Function: model

File: /home2/beta/public_html/lupopi/index.php
Line: 317
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: Declaration of Article::update($idx) should be compatible with MY_Model::update($idx, $data)

Filename: customize/Article.php

Line Number: 285

Backtrace:

File: /home2/beta/public_html/lupopi/application/controllers/Blog.php
Line: 8
Function: model

File: /home2/beta/public_html/lupopi/index.php
Line: 317
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: Declaration of Article::upload_image($idx, $sub_idx) should be compatible with MY_Model::upload_image($idx, $temp_key = NULL)

Filename: customize/Article.php

Line Number: 307

Backtrace:

File: /home2/beta/public_html/lupopi/application/controllers/Blog.php
Line: 8
Function: model

File: /home2/beta/public_html/lupopi/index.php
Line: 317
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: Declaration of Article_category::insert() should be compatible with MY_Model::insert($data, $temp_key = NULL)

Filename: customize/Article_category.php

Line Number: 49

Backtrace:

File: /home2/beta/public_html/lupopi/application/models/customize/Article.php
Line: 31
Function: model

File: /home2/beta/public_html/lupopi/application/controllers/Blog.php
Line: 8
Function: model

File: /home2/beta/public_html/lupopi/index.php
Line: 317
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: Declaration of Article_category::update($idx) should be compatible with MY_Model::update($idx, $data)

Filename: customize/Article_category.php

Line Number: 61

Backtrace:

File: /home2/beta/public_html/lupopi/application/models/customize/Article.php
Line: 31
Function: model

File: /home2/beta/public_html/lupopi/application/controllers/Blog.php
Line: 8
Function: model

File: /home2/beta/public_html/lupopi/index.php
Line: 317
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: Declaration of Article_tag::update($idx) should be compatible with MY_Model::update($idx, $data)

Filename: customize/Article_tag.php

Line Number: 71

Backtrace:

File: /home2/beta/public_html/lupopi/application/models/customize/Article.php
Line: 32
Function: model

File: /home2/beta/public_html/lupopi/application/controllers/Blog.php
Line: 8
Function: model

File: /home2/beta/public_html/lupopi/index.php
Line: 317
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: Declaration of A2t::insert($article_idx, $tag_idx) should be compatible with MY_Model::insert($data, $temp_key = NULL)

Filename: customize/A2t.php

Line Number: 134

Backtrace:

File: /home2/beta/public_html/lupopi/application/models/customize/Article_tag.php
Line: 20
Function: model

File: /home2/beta/public_html/lupopi/application/models/customize/Article.php
Line: 32
Function: model

File: /home2/beta/public_html/lupopi/application/controllers/Blog.php
Line: 8
Function: model

File: /home2/beta/public_html/lupopi/index.php
Line: 317
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: Declaration of A2p::insert($article_idx, $product_idx) should be compatible with MY_Model::insert($data, $temp_key = NULL)

Filename: customize/A2p.php

Line Number: 134

Backtrace:

File: /home2/beta/public_html/lupopi/application/models/customize/Article.php
Line: 33
Function: model

File: /home2/beta/public_html/lupopi/application/controllers/Blog.php
Line: 8
Function: model

File: /home2/beta/public_html/lupopi/index.php
Line: 317
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: Declaration of Product::insert($temp_key) should be compatible with MY_Model::insert($data, $temp_key = NULL)

Filename: customize/Product.php

Line Number: 288

Backtrace:

File: /home2/beta/public_html/lupopi/application/models/customize/A2p.php
Line: 19
Function: model

File: /home2/beta/public_html/lupopi/application/models/customize/Article.php
Line: 33
Function: model

File: /home2/beta/public_html/lupopi/application/controllers/Blog.php
Line: 8
Function: model

File: /home2/beta/public_html/lupopi/index.php
Line: 317
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: Declaration of Product::update($idx) should be compatible with MY_Model::update($idx, $data)

Filename: customize/Product.php

Line Number: 305

Backtrace:

File: /home2/beta/public_html/lupopi/application/models/customize/A2p.php
Line: 19
Function: model

File: /home2/beta/public_html/lupopi/application/models/customize/Article.php
Line: 33
Function: model

File: /home2/beta/public_html/lupopi/application/controllers/Blog.php
Line: 8
Function: model

File: /home2/beta/public_html/lupopi/index.php
Line: 317
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: Declaration of Product_category::insert() should be compatible with MY_Model::insert($data, $temp_key = NULL)

Filename: customize/Product_category.php

Line Number: 189

Backtrace:

File: /home2/beta/public_html/lupopi/application/models/customize/Product.php
Line: 39
Function: model

File: /home2/beta/public_html/lupopi/application/models/customize/A2p.php
Line: 19
Function: model

File: /home2/beta/public_html/lupopi/application/models/customize/Article.php
Line: 33
Function: model

File: /home2/beta/public_html/lupopi/application/controllers/Blog.php
Line: 8
Function: model

File: /home2/beta/public_html/lupopi/index.php
Line: 317
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: Declaration of Product_category::update($idx) should be compatible with MY_Model::update($idx, $data)

Filename: customize/Product_category.php

Line Number: 202

Backtrace:

File: /home2/beta/public_html/lupopi/application/models/customize/Product.php
Line: 39
Function: model

File: /home2/beta/public_html/lupopi/application/models/customize/A2p.php
Line: 19
Function: model

File: /home2/beta/public_html/lupopi/application/models/customize/Article.php
Line: 33
Function: model

File: /home2/beta/public_html/lupopi/application/controllers/Blog.php
Line: 8
Function: model

File: /home2/beta/public_html/lupopi/index.php
Line: 317
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: Declaration of A2c::insert($article_idx, $category_idx) should be compatible with MY_Model::insert($data, $temp_key = NULL)

Filename: customize/A2c.php

Line Number: 132

Backtrace:

File: /home2/beta/public_html/lupopi/application/controllers/Blog.php
Line: 14
Function: model

File: /home2/beta/public_html/lupopi/index.php
Line: 317
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: Declaration of Tracking_code::insert($temp_key) should be compatible with MY_Model::insert($data, $temp_key = NULL)

Filename: customize/Tracking_code.php

Line Number: 35

Backtrace:

File: /home2/beta/public_html/lupopi/application/helpers/header_helper.php
Line: 9
Function: model

File: /home2/beta/public_html/lupopi/application/controllers/Blog.php
Line: 207
Function: get_header_footer

File: /home2/beta/public_html/lupopi/application/controllers/Blog.php
Line: 224
Function: article

File: /home2/beta/public_html/lupopi/index.php
Line: 317
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: Declaration of Tracking_code::update($idx) should be compatible with MY_Model::update($idx, $data)

Filename: customize/Tracking_code.php

Line Number: 47

Backtrace:

File: /home2/beta/public_html/lupopi/application/helpers/header_helper.php
Line: 9
Function: model

File: /home2/beta/public_html/lupopi/application/controllers/Blog.php
Line: 207
Function: get_header_footer

File: /home2/beta/public_html/lupopi/application/controllers/Blog.php
Line: 224
Function: article

File: /home2/beta/public_html/lupopi/index.php
Line: 317
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: Declaration of About::insert() should be compatible with MY_Model::insert($data, $temp_key = NULL)

Filename: customize/About.php

Line Number: 25

Backtrace:

File: /home2/beta/public_html/lupopi/application/helpers/header_helper.php
Line: 10
Function: model

File: /home2/beta/public_html/lupopi/application/controllers/Blog.php
Line: 207
Function: get_header_footer

File: /home2/beta/public_html/lupopi/application/controllers/Blog.php
Line: 224
Function: article

File: /home2/beta/public_html/lupopi/index.php
Line: 317
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: Declaration of About::update($idx) should be compatible with MY_Model::update($idx, $data)

Filename: customize/About.php

Line Number: 36

Backtrace:

File: /home2/beta/public_html/lupopi/application/helpers/header_helper.php
Line: 10
Function: model

File: /home2/beta/public_html/lupopi/application/controllers/Blog.php
Line: 207
Function: get_header_footer

File: /home2/beta/public_html/lupopi/application/controllers/Blog.php
Line: 224
Function: article

File: /home2/beta/public_html/lupopi/index.php
Line: 317
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: Declaration of Service::insert() should be compatible with MY_Model::insert($data, $temp_key = NULL)

Filename: customize/Service.php

Line Number: 25

Backtrace:

File: /home2/beta/public_html/lupopi/application/helpers/header_helper.php
Line: 11
Function: model

File: /home2/beta/public_html/lupopi/application/controllers/Blog.php
Line: 207
Function: get_header_footer

File: /home2/beta/public_html/lupopi/application/controllers/Blog.php
Line: 224
Function: article

File: /home2/beta/public_html/lupopi/index.php
Line: 317
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: Declaration of Service::update($idx) should be compatible with MY_Model::update($idx, $data)

Filename: customize/Service.php

Line Number: 38

Backtrace:

File: /home2/beta/public_html/lupopi/application/helpers/header_helper.php
Line: 11
Function: model

File: /home2/beta/public_html/lupopi/application/controllers/Blog.php
Line: 207
Function: get_header_footer

File: /home2/beta/public_html/lupopi/application/controllers/Blog.php
Line: 224
Function: article

File: /home2/beta/public_html/lupopi/index.php
Line: 317
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: Declaration of Front_menu::update($idx) should be compatible with MY_Model::update($idx, $data)

Filename: customize/Front_menu.php

Line Number: 102

Backtrace:

File: /home2/beta/public_html/lupopi/application/helpers/header_helper.php
Line: 12
Function: model

File: /home2/beta/public_html/lupopi/application/controllers/Blog.php
Line: 207
Function: get_header_footer

File: /home2/beta/public_html/lupopi/application/controllers/Blog.php
Line: 224
Function: article

File: /home2/beta/public_html/lupopi/index.php
Line: 317
Function: require_once

降低 mysql table 在硬碟的實際用量

A PHP Error was encountered

Severity: Warning

Message: Declaration of User::update($idx) should be compatible with MY_Model::update($idx, $data)

Filename: customize/User.php

Line Number: 89

Backtrace:

File: /home2/beta/public_html/lupopi/application/helpers/user_helper.php
Line: 23
Function: model

File: /home2/beta/public_html/lupopi/application/views/front/common/menu_mobile.php
Line: 17
Function: is_user_login

File: /home2/beta/public_html/lupopi/application/helpers/header_helper.php
Line: 66
Function: view

File: /home2/beta/public_html/lupopi/application/controllers/Blog.php
Line: 207
Function: get_header_footer

File: /home2/beta/public_html/lupopi/application/controllers/Blog.php
Line: 224
Function: article

File: /home2/beta/public_html/lupopi/index.php
Line: 317
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: Declaration of Cart_setting::get() should be compatible with MY_Model::get($idx)

Filename: system/Cart_setting.php

Line Number: 18

Backtrace:

File: /home2/beta/public_html/lupopi/application/models/system/Cart.php
Line: 11
Function: model

File: /home2/beta/public_html/lupopi/application/helpers/cart_helper.php
Line: 9
Function: model

File: /home2/beta/public_html/lupopi/application/views/front/common/menu_mobile.php
Line: 23
Function: get_cart_quantity

File: /home2/beta/public_html/lupopi/application/helpers/header_helper.php
Line: 66
Function: view

File: /home2/beta/public_html/lupopi/application/controllers/Blog.php
Line: 207
Function: get_header_footer

File: /home2/beta/public_html/lupopi/application/controllers/Blog.php
Line: 224
Function: article

File: /home2/beta/public_html/lupopi/index.php
Line: 317
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: Declaration of Cart_setting::update() should be compatible with MY_Model::update($idx, $data)

Filename: system/Cart_setting.php

Line Number: 31

Backtrace:

File: /home2/beta/public_html/lupopi/application/models/system/Cart.php
Line: 11
Function: model

File: /home2/beta/public_html/lupopi/application/helpers/cart_helper.php
Line: 9
Function: model

File: /home2/beta/public_html/lupopi/application/views/front/common/menu_mobile.php
Line: 23
Function: get_cart_quantity

File: /home2/beta/public_html/lupopi/application/helpers/header_helper.php
Line: 66
Function: view

File: /home2/beta/public_html/lupopi/application/controllers/Blog.php
Line: 207
Function: get_header_footer

File: /home2/beta/public_html/lupopi/application/controllers/Blog.php
Line: 224
Function: article

File: /home2/beta/public_html/lupopi/index.php
Line: 317
Function: require_once

0

A PHP Error was encountered

Severity: Warning

Message: Declaration of Page_banner::update($idx) should be compatible with MY_Model::update($idx, $data)

Filename: customize/Page_banner.php

Line Number: 98

Backtrace:

File: /home2/beta/public_html/lupopi/application/helpers/header_helper.php
Line: 153
Function: model

File: /home2/beta/public_html/lupopi/application/views/front/blog/main.php
Line: 1
Function: get_page_banner

File: /home2/beta/public_html/lupopi/application/controllers/Blog.php
Line: 214
Function: view

File: /home2/beta/public_html/lupopi/application/controllers/Blog.php
Line: 224
Function: article

File: /home2/beta/public_html/lupopi/index.php
Line: 317
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: Declaration of Page_banner::upload_image($idx, $sub_idx) should be compatible with MY_Model::upload_image($idx, $temp_key = NULL)

Filename: customize/Page_banner.php

Line Number: 110

Backtrace:

File: /home2/beta/public_html/lupopi/application/helpers/header_helper.php
Line: 153
Function: model

File: /home2/beta/public_html/lupopi/application/views/front/blog/main.php
Line: 1
Function: get_page_banner

File: /home2/beta/public_html/lupopi/application/controllers/Blog.php
Line: 214
Function: view

File: /home2/beta/public_html/lupopi/application/controllers/Blog.php
Line: 224
Function: article

File: /home2/beta/public_html/lupopi/index.php
Line: 317
Function: require_once

A PHP Error was encountered

Severity: Notice

Message: Trying to access array offset on value of type bool

Filename: blog/detail.php

Line Number: 19

Backtrace:

File: /home2/beta/public_html/lupopi/application/views/front/blog/detail.php
Line: 19
Function: _error_handler

File: /home2/beta/public_html/lupopi/application/controllers/Blog.php
Line: 213
Function: view

File: /home2/beta/public_html/lupopi/application/controllers/Blog.php
Line: 224
Function: article

File: /home2/beta/public_html/lupopi/index.php
Line: 317
Function: require_once

" alt="

A PHP Error was encountered

Severity: Notice

Message: Trying to access array offset on value of type bool

Filename: blog/detail.php

Line Number: 19

Backtrace:

File: /home2/beta/public_html/lupopi/application/views/front/blog/detail.php
Line: 19
Function: _error_handler

File: /home2/beta/public_html/lupopi/application/controllers/Blog.php
Line: 213
Function: view

File: /home2/beta/public_html/lupopi/application/controllers/Blog.php
Line: 224
Function: article

File: /home2/beta/public_html/lupopi/index.php
Line: 317
Function: require_once

" class="img-fluid">

降低 mysql table 在硬碟的實際用量

技術筆記
最近 vps 的硬碟又不夠了

想出了一連串降低用量的方法

本來想說

把過大的 table 切成數十個

原本的 table 有 八億筆資料

把它切割成五千萬筆一個 table

然後把這些 table 都會出成 sql 檔案

存在硬碟裡



因為這些資料其實永遠都不會變動了

而且暫時也用不到

有需要再把他 restore 到便宜的裝置上就好 (例如 NAS)

用程式跑了好一陣子以後

也都下載完了

發現原本的 table 在硬碟裡面還是佔了 80G

但如果從 phpmyadmin 看

卻說只有佔用了 10G

問題是什麼呢?

如果你的 table 用的是 innodb

一個 table 會有兩個檔案

其中一個吃容量很大的叫做 ibd

這個檔案會有一些 sql 的歷程

那些歷程是萬一你的 table 壞掉的時候

可以讓你重跑的資料

即使是你把資料刪除大部分

這個檔案只會變大不會變小

 

後來我想到一個方法

只要你弄一個新的 table

然後再把舊的 table 的資料倒過去

歷程並不會被複製過去 只有資料會被複製過去

所以檔案大小就會變小

複製完畢後

只要把舊的刪掉 再把新的名稱改成舊的

就完成啦

至於歷程會不見的部分

就看你有沒有需要用到歷程的功能

自己分析一下