且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

编辑phpmyadmin blob字段

更新时间:2023-02-08 23:07:10

啊. phpmyadmin网站上的此页面: http://www.phpmyadmin.net/documentation/#faq1_31

Ah. the phpmyadmin site, there this page: http://www.phpmyadmin.net/documentation/#faq1_31

$cfg['ProtectBinary'] boolean or string
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;
    * 'all' to disallow editing of all BINARY or BLOB columns.

好,接下来详细介绍如何允许我编辑Blob.

Ok, so that details how to allow me to edit my blobs.

我做了更改

$cfg['ProtectBinary'] = FALSE;
$cfg['ShowBlob'] = TRUE;

并将这两行作为我的config.inc.php文件的最后一行,由于我使用的是UBUNTU并使用了自动安装sudo apt-get install phpmyadmin,因此它们位于/etc/phpmyadmin/

and put these two as the last lines in my config.inc.php file, which, because i'm using UBUNTU and used the auto install sudo apt-get install phpmyadmin, was at /etc/phpmyadmin/

一切正常,有点.现在,我可以编辑我的Blob ...限制为phpmyadmin在"blob-view"中显示blob的当前内容,这是一堆数字或一些废话.

And everything worked, kinda. I can now edit my blobs... with the limitation that phpmyadmin shows the current contents of the blob in "blob-view", which is a whole bunch of numbers or some nonsense.

我发现一个简单的解决方案是:

Simple solution i found was to:

  1. 覆盖文字.简单编辑并不是真正的选择,但是幸运的是,我不需要编辑,只需添加新数据即可.
  2. 将功能"选项从...更改为……我不记得它是什么了,但这有点疯狂……只是空白".这与其他选项的函数选项默认值(整数等)相同.

欢呼声, 安德鲁

PS

$cfg['ShowBlob'] = TRUE;

来自我链接到的问题中的给定URL.张贴者指出这在phpmyadmin中无效,但几个月前我仅使用最新的sudo-get下载,因此仍然有效.实际上,我需要将该值输入以使编辑工作.

was from the given url in the question i linked to. The poster states it isn't effective in phpmyadmin, but i only downloaded using a latest sudo-get a few months back, so it still works. Actually, i needed to put that value in to get editing to work.