加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > PHP教程 > 正文

在phpMyAdmin> 4.3.0中禁用BINARY列的文件下载链接

发布时间:2020-12-13 22:26:02 所属栏目:PHP教程 来源:网络整理
导读:我有一个 MySQL数据库,我在所有表中使用二进制(36)列作为唯一ID. 当引入phpMyAdmin 4.3.0时,看起来他们添加了一个功能,其中BLOB和BINARY类型列将其数据显示为链接,单击该链接将允许您下载该文件(在我的情况下,下载.bin文件). 如果要编辑数据,则必须单击单元
我有一个 MySQL数据库,我在所有表中使用二进制(36)列作为唯一ID.

当引入phpMyAdmin 4.3.0时,看起来他们添加了一个功能,其中BLOB和BINARY类型列将其数据显示为链接,单击该链接将允许您下载该文件(在我的情况下,下载.bin文件).

Clicking the ID downloads a .bin file

如果要编辑数据,则必须单击单元格的空白部分才能打开“编辑”模式.

我可以看到这很有用,但就我而言,我对它下载的.bin文件不感兴趣.

在早期版本的phpMyAdmin(例如4.1.0)中,此功能不可用(或者至少在默认情况下未启用).您只需单击显示的文本,就会弹出编辑对话框.

Clicking the ID opens up the edit dialog

我已经查看了phpMyAdmin’s Documentation并且无法找到禁用此设置的设置.有$cfg['ProtectBinary']设置,但我已经设置为blob,所以这不应该是一个问题.

理想情况下,我想使用最新版本的phpMyAdmin,但前提是我可以更改此设置.谢谢.

解决方法

https://media.readthedocs.org/pdf/phpmyadmin/latest/phpmyadmin.pdf说:

$cfg[’ProtectBinary’]
Type boolean or string
Default value ’blob’
Defines whether BLOB or BINARY columns are protected from editing when browsing a table’s content. Valid
values are:
?false to allow editing of all columns;
?’blob’ to allow editing of all columns except BLOBS;
?’noblob’ to disallow editing of all columns except BLOBS (the opposite of ’blob’);
?’all’ to disallow editing of all BINARY or BLOB columns.

因此,默认值为’blob’,您应该将其设置为false:

$cfg[’ProtectBinary’] = false;

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读