There was a problem inserting pictures in Typecho's article

Discuss the problems in the use of the program
reply
Kaikai 1995
Posts: nine
Registration time: 22:57, December 25, 2022

There was a problem inserting pictures in Typecho's article

Posts from Kaikai 1995 »

It has been almost a year since I used Typecho. It runs on my audio WIFI,
Sometimes I will move my blog home, so I directly use the relative address of the picture on the article
Click the Insert button according to the picture above the column, fill in the relative address, and the result is that http://is automatically added directly, so the prefix must be manually deleted after each insertion, which means it is troublesome, and I want to know how to configure it

code: Select All

 ! [Still able to chat. png] [1] [1]:  http:///typecho/usr/uploads/2022/12/710853138.png
Lopwon
Posts: one hundred and seventy-six
Registration time: 11:19, November 14, 2016

Re: There was a problem inserting pictures in Typecho's article

Posts from Lopwon »

You can use the default link, and then use the str_replace() function to replace the link in the content output of Post and Page, such as:

code: Select All

 <? Php echo str_replace ('link to replace ','new link', $this ->content);?>
Kaikai 1995
Posts: nine
Registration time: 22:57, December 25, 2022

Re: There was a problem inserting pictures in Typecho's article

Posts from Kaikai 1995 »

Lopwon Wrote: 12:09, December 26, 2022 You can use the default link, and then use the str_replace() function to replace the link in the content output of Post and Page, such as:

code: Select All

 <? Php echo str_replace ('link to replace ','new link', $this ->content);?>
I can't read PHP. It's a big head
reply