<div class="solutionbg" style="background: url({php}$categoryData['thumb']=str_replace('\\','/',$categoryData['thumb']);echo $categoryData['thumb'];{/php}) no-repeat center center; width: 100%;height: 348px"></div>
这段代码的意思是:凡是\
替换成/
然后赋值给$categoryData[‘thumb’].也就是赋值给要输出的变量.
'\\'代表一个\
转换成这样就好了啦
/public/upload/pic/20200407/18a061ba7e85e078b28a537cc00b901b.png