我尝试从SQL脚本更新wp\\U Posteta。
这是我在表中的原始行:
a:7:{s:16:"lambda_page_item";a:24:{i:0;a:9:{s:9:"grid_size";s:3:"940";s:7:"boxname";s:19:"Associati - Rinnova";s:16:"activate_desktop";s:3:"off";s:18:"activate_landscape";s:3:"off";s:15:"activate_mobile";s:3:"off";s:8:"box_type";s:14:"simple_textbox";s:9:"box_title";s:20:"Campagna associativa";s:13:"extra_content";s:268:"<p style="text-align: center;"><a href="../associati-campagna-associativa-2020/" target="_blank" rel="noopener"><img class="aligncenter wp-image-25865 size-full" src="../wp-content/uploads/2019/12/Banner-associativa-2020.png" alt="" width="800" height="133" /></a></p>";s:7:"sidebar";s:22:"nevada_sidebar_default";}i:1;a:9:{s:9:"grid_size";s:3:"460";s:7:"boxname";s:16:"Prima iscrizione";s:16:"activate_desktop";s:2:"on";s:18:"activate_landscape";s:2:"on";s:15:"activate_mobile";s:2:"on";s:8:"box_type";s:14:"simple_textbox";s:9:"box_title";s:31:"Associati alla Fondazione Taras";s:13:"extra_content";s:263:"<p><a title="Prima iscrizione" href="../associati/socio-ordinario" target="_blank" rel="noopener"><img class="aligncenter size-full wp-image-18796" src="../wp-content/uploads/2015/01/Prima-iscrizione.png" alt="Prima iscrizione" width="550" height="135" /></a></p>";s:7:"sidebar";s:22:"nevada_sidebar_default";}i:2;a:9:{s:9:"grid_size";s:3:"460";s:7:"boxname";s:7:"Rinnovo";s:16:"activate_desktop";s:2:"on";s:18:"activate_landscape";s:2:"on";s:15:"activate_mobile";s:2:"on";s:8:"box_type";s:14:"simple_textbox";s:9:"box_title";s:25:"Rinnova la tua iscrizione";s:13:"extra_content";s:336:"<p style="text-align: center;"><a title="Rinnova la tua iscrizione" href="../associati-campagna-associativa-2015/rinnova-la-tua-iscrizione" target="_blank" rel="noopener"><img class="aligncenter size-full wp-image-18797" src="../wp-content/uploads/2015/01/Rinnovo.png" alt="Rinnova la tua iscrizione" width="550" height="135" /></a></p>";s:7:"sidebar";s:22:"nevada_sidebar_default";}i:3;a:16:{s:9:"grid_size";s:3:"940";s:7:"boxname";s:9:"Le ultime";s:16:"activate_desktop";s:3:"off";s:18:"activate_landscape";s:3:"off";s:15:"activate_mobile";s:3:"off";s:8:"box_type";s:12:"blog_excerpt";s:9:"box_title";s:28:"Ultime dal supporters\' trust";s:20:"activate_blog_images";s:2:"on";s:21:"activate_blog_excerpt";s:2:"on";s:18:"activate_blog_like";s:3:"off";s:9:"blog_grid";s:8:"one_half";s:19:"blog_excerpt_length";s:1:"1";s:11:"blog_length";s:1:"6";s:11:"post_not_in";a:2:{i:0;s:5:"17511";i:1;s:5:"17485";}s:13:"only_category";a:11:{i:0;s:3:"430";i:1;s:3:"100";i:2;s:1:"5";i:3;s:2:"51";i:4;s:2:"73";i:5;s:2:"75";i:6;s:3:"183";i:7;s:3:"408";i:8;s:2:"83";i:9;s:2:"17";i:10;s:2:"47";}s:7:"sidebar";s:22:"nevada_sidebar_default";}i:4;a:9:{s:9:"grid_size";s:3:"940";s:7:"boxname";s:8:"Scrivici";s:16:"activate_desktop";s:2:"on";s:18:"activate_landscape";s:2:"on";s:15:"activate_mobile";s:2:"on";s:8:"box_type";s:14:"simple_textbox";s:9:"box_title";s:38:"Scrivi anche tu su fondazionetaras.it!";s:13:"extra_content";s:215:"<p>[cta headline="" buttontext="Scrivici ora!" buttonlink="mailto:[email protected]" ]Per mandarci la tua proposta di pubblicazione di qualsiasi genere scrivi a: [email protected] [/cta]</p>";s:7:"sidebar";s:22:"nevada_sidebar_default";}i:5;a:15:{s:9:"grid_size";s:3:"940";s:7:"boxname";s:13:"Match program";s:16:"activate_desktop";s:2:"on";s:18:"activate_landscape";s:2:"on";s:15:"activate_mobile";s:2:"on";s:8:"box_type";s:12:"blog_excerpt";s:9:"box_title";s:13:"Match program";s:20:"activate_blog_images";s:2:"on";s:21:"activate_blog_excerpt";s:2:"on";s:18:"activate_blog_like";s:2:"on";s:9:"blog_grid";s:10:"full-width";s:19:"blog_excerpt_length";s:2:"10";s:11:"blog_length";s:1:"1";s:13:"only_category";a:2:{i:0;s:3:"814";i:1;s:3:"150";}s:7:"sidebar";s:22:"nevada_sidebar_default";}i:6;a:12:{s:9:"grid_size";s:3:"940";s:7:"boxname";s:9:"Portfolio";s:16:"activate_desktop";s:2:"on";s:18:"activate_landscape";s:2:"on";s:15:"activate_mobile";s:2:"on";s:8:"box_type";s:17:"portfolio_excerpt";s:9:"box_title";s:42:"Portfolio | Le fotografie della Fondazione";s:15:"portfolio_count";s:1:"4";s:14:"portfolio_grid";s:8:"one_half";s:12:"project_type";a:10:{i:0;s:9:"assemblee";i:1;s:12:"foto-gallery";i:2;s:9:"2012-2013";i:3;s:9:"2013-2014";i:4;s:15:"match-2014-2015";i:5;s:7:"match-2";i:6;s:23:"scuola-calcio-2014-2015";i:7;s:17:"settore-giovanile";i:8;s:5:"tutti";i:9;s:5:"varie";}s:20:"portfolio_item_title";s:2:"on";s:7:"sidebar";s:22:"nevada_sidebar_default";}i:7;a:8:{s:9:"grid_size";s:3:"940";s:7:"boxname";s:10:"Classifica";s:16:"activate_desktop";s:2:"on";s:18:"activate_landscape";s:2:"on";s:15:"activate_mobile";s:2:"on";s:8:"box_type";s:14:"simple_textbox";s:9:"box_title";s:10:"Classifica";s:7:"sidebar";s:22:"nevada_sidebar_default";}i:8;a:2:{s:9:"grid_size";s:3:"220";s:7:"sidebar";s:22:"nevada_sidebar_default";}i:9;a:2:{s:9:"grid_size";s:3:"220";s:7:"sidebar";s:22:"nevada_sidebar_default";}i:10;a:1:{s:7:"sidebar";s:22:"nevada_sidebar_default";}i:11;a:1:{s:7:"sidebar";s:22:"nevada_sidebar_default";}i:12;a:2:{s:9:"grid_size";s:3:"220";s:7:"sidebar";s:22:"nevada_sidebar_default";}i:13;a:1:{s:7:"sidebar";s:22:"nevada_sidebar_default";}i:14;a:1:{s:7:"sidebar";s:22:"nevada_sidebar_default";}i:15;a:1:{s:7:"sidebar";s:22:"nevada_sidebar_default";}i:16;a:1:{s:7:"sidebar";s:22:"nevada_sidebar_default";}i:17;a:1:{s:7:"sidebar";s:22:"nevada_sidebar_default";}i:18;a:1:{s:7:"sidebar";s:22:"nevada_sidebar_default";}i:19;a:1:{s:7:"sidebar";s:22:"nevada_sidebar_default";}i:20;a:1:{s:7:"sidebar";s:22:"nevada_sidebar_default";}i:21;a:1:{s:7:"sidebar";s:22:"nevada_sidebar_default";}i:22;a:1:{s:7:"sidebar";s:22:"nevada_sidebar_default";}i:23;a:1:{s:7:"sidebar";s:22:"nevada_sidebar_default";}}s:7:"sidebar";s:16:"nevada_sidebar_4";s:14:"sidebar_second";s:19:"nevada_sidebar_none";s:13:"sidebar_align";s:5:"right";s:15:"background_type";s:12:"default_none";s:24:"default_backgroundslider";s:8:"lambda_2";s:9:"home_item";a:6:{i:0;s:7:"service";i:1;s:9:"portfolio";i:2;s:4:"blog";i:3;s:12:"testimonials";i:4;s:7:"clients";i:5;s:3:"cta";}}
如果我尝试更改此部分:
img class="aligncenter wp-image-25865 size-full"
src="../wp-content/uploads/2019/12/Banner-associativa-2020.png" alt=""
width="800" height="133"
具体如下:
img class="aligncenter wp-image-25865 size-full"
src="../wp-content/uploads/2020/12/banner_assoc_2021.png" alt=""
width="800" height="133"
网站主页呈现下降。
我不明白为什么?
最合适的回答,由SO网友:Tom J Nowell 整理而成
您不应该直接更改序列化的PHP数据结构。
序列化数据包含每个值的长度,通过更改一段文本,该长度不再正确,PHP会遇到致命错误并崩溃。
我不知道您在做什么,但您不应该手动修改序列化的PHP字符串。