Everyone should have the content > Attachment management > Attachment address substitution feature in case of domain change (for example, from local upload to space).
Basically, you can't replace the address of the original domain name in all the tables.
Now Phpcms V9 The latest version of the problem still exists.
Find cause Discovery phpcms\modules\attachment\address.php Update () (latest version LINE35) has a problem with the following code:
if (Preg_match ('/(Char|text|mediumtex) +/i ', $val)) {
The sentence is judged for all the field types in all tables. If this is Char|text|mediumtex three types of fields, Executes the contents of the corresponding field. Otherwise, it is not replaced. The URL field type of most attachments in the table is a varchar type. Therefore, most of the attachment URLs are not replaced.
Correction Method:
Replace the line with: if (Preg_match ('/(char|text|mediumtex| VARCHAR) +/i ', $val)) {
This article transferred from: http://bbs.phpcms.cn/thread-724119-1-1.html
Share Phpcms V9 Change domain name, attachment address can not be batch update (change the change) problem > Solution!!