PHP“;“继续”;瞄准;“中断”;在本地尝试导入wordpress站点时

PHP“;“继续”;瞄准;“中断”;在本地尝试导入wordpress站点时,php,wordpress,import,Php,Wordpress,Import,您好(或者再次您好,因为我问了一个问题,但解释得有点糟糕,总的来说我误解了这个问题) 我正在尝试在本地手动导入wordpress站点。我第一次很难将数据库链接到该站点,因为我使用的是mariaDB和站点MySQL,但现在一切正常 我现在有PHP错误显示: ( ! ) Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in C:\wamp64\www\ww

您好(或者再次您好,因为我问了一个问题,但解释得有点糟糕,总的来说我误解了这个问题)

我正在尝试在本地手动导入wordpress站点。我第一次很难将数据库链接到该站点,因为我使用的是mariaDB和站点MySQL,但现在一切正常

我现在有PHP错误显示:

( ! ) Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in C:\wamp64\www\www\wp-includes\pomo\plural-forms.php on line 210
Call Stack
#   Time    Memory  Function    Location
1   0.0004  407568  {main}( )   ...\index.php:0
2   0.0007  407912  require( 'C:\wamp64\www\www\wp-blog-header.php' )   ...\index.php:17
3   0.0012  408832  require_once( 'C:\wamp64\www\www\wp-load.php' ) ...\wp-blog-header.php:13
4   0.0016  409632  require_once( 'C:\wamp64\www\www\wp-config.php' )   ...\wp-load.php:37
5   0.0030  411184  require_once( 'C:\wamp64\www\www\wp-settings.php' ) ...\wp-config.php:95
6   0.0372  730712  require( 'C:\wamp64\www\www\wp-includes\pomo\mo.php' )  ...\wp-settings.php:102
7   0.0382  733336  require_once( 'C:\wamp64\www\www\wp-includes\pomo\translations.php' )   ...\mo.php:10

( ! ) Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in C:\wamp64\www\www\wp-content\plugins\revslider\includes\operations.class.php on line 5467
Call Stack
#   Time    Memory  Function    Location
1   0.0004  407568  {main}( )   ...\index.php:0
2   0.0007  407912  require( 'C:\wamp64\www\www\wp-blog-header.php' )   ...\index.php:17
3   0.0012  408832  require_once( 'C:\wamp64\www\www\wp-load.php' ) ...\wp-blog-header.php:13
4   0.0016  409632  require_once( 'C:\wamp64\www\www\wp-config.php' )   ...\wp-load.php:37
5   0.0030  411184  require_once( 'C:\wamp64\www\www\wp-settings.php' ) ...\wp-config.php:95
6   0.5117  5808072 include_once( 'C:\wamp64\www\www\wp-content\plugins\revslider\revslider.php' )  ...\wp-settings.php:305

( ! ) Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in C:\wamp64\www\www\wp-content\plugins\revslider\includes\operations.class.php on line 5475
Call Stack
#   Time    Memory  Function    Location
1   0.0004  407568  {main}( )   ...\index.php:0
2   0.0007  407912  require( 'C:\wamp64\www\www\wp-blog-header.php' )   ...\index.php:17
3   0.0012  408832  require_once( 'C:\wamp64\www\www\wp-load.php' ) ...\wp-blog-header.php:13
4   0.0016  409632  require_once( 'C:\wamp64\www\www\wp-config.php' )   ...\wp-load.php:37
5   0.0030  411184  require_once( 'C:\wamp64\www\www\wp-settings.php' ) ...\wp-config.php:95
6   0.5117  5808072 include_once( 'C:\wamp64\www\www\wp-content\plugins\revslider\revslider.php' )  ...\wp-settings.php:305

( ! ) Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in C:\wamp64\www\www\wp-content\plugins\revslider\includes\output.class.php on line 7357
Call Stack
#   Time    Memory  Function    Location
1   0.0004  407568  {main}( )   ...\index.php:0
2   0.0007  407912  require( 'C:\wamp64\www\www\wp-blog-header.php' )   ...\index.php:17
3   0.0012  408832  require_once( 'C:\wamp64\www\www\wp-load.php' ) ...\wp-blog-header.php:13
4   0.0016  409632  require_once( 'C:\wamp64\www\www\wp-config.php' )   ...\wp-load.php:37
5   0.0030  411184  require_once( 'C:\wamp64\www\www\wp-settings.php' ) ...\wp-config.php:95
6   0.5117  5808072 include_once( 'C:\wamp64\www\www\wp-content\plugins\revslider\revslider.php' )  ...\wp-settings.php:305

( ! ) Warning: Cannot modify header information - headers already sent by (output started at C:\wamp64\www\www\wp-content\plugins\revslider\includes\operations.class.php:5467) in C:\wamp64\www\www\wp-includes\pluggable.php on line 1216
Call Stack
#   Time    Memory  Function    Location
1   0.0004  407568  {main}( )   ...\index.php:0
2   0.0007  407912  require( 'C:\wamp64\www\www\wp-blog-header.php' )   ...\index.php:17
3   1.9924  32967368    wp( )   ...\wp-blog-header.php:16
4   1.9924  32967368    WP->main( ) ...\functions.php:960
5   2.0027  28820312    do_action_ref_array( )  ...\class-wp.php:726
6   2.0027  28820312    WP_Hook->do_action( )   ...\plugin.php:515
7   2.0027  28820312    WP_Hook->apply_filters( )   ...\class-wp-hook.php:310
8   2.0453  28920216    rsssl_front_end->wp_redirect_to_ssl( )  ...\class-wp-hook.php:286
9   2.0453  28920264    wp_redirect( )  ...\class-front-end.php:105
10  2.0458  28920328    header ( )  ...\pluggable.php:1216
所以我知道这是一个PHP版本的问题,可以通过编写“continue 2”来解决。但问题是,我听说修改wordpress站点中的代码不是一个解决方案,因为它可能在某些方面破坏站点。我能做什么?有人知道吗?在ovh上我可以看到它使用PHP7,在Wamp上也是如此


谢谢

是的,这是PHP7.3+中不推荐使用的代码,您必须遍历每一行并将“continue”替换为“break”,才能停止警告

对于已经发送的标题,如果没有警告,这将自行修复


另一个有点脏的解决方案是添加
ini\u集('error\u reporting',E\u ALL&~E\u NOTICE&~E\u STRICT&~E\u DEPRECATED)index.php顶部附近的某个地方

另一个“肮脏”的解决方案就是忽略它们——它们是警告,如果一切正常,可以忽略它们。不要更改为
continue 2
,这将改变行为。感谢您的回答,该网站根本没有显示,因此我猜这些警告正在阻止某些内容。但是,如果我有相同的PHP版本,为什么会发生这种情况?请尝试在PHP.ini中插入
output\u buffering=4096
,然后重新启动服务器,因为它不起作用。你是说bin文件夹中的php.ini?我有3个php版本,也许我应该切换到OVH上的同一个版本?我将“continue”更改为“break”,但我遇到了一个问题,localhost将加载,而不是“localhost/thiswebsite”。除此之外,我所有的项目都正确加载,我有一条“err\u connection\u densed”消息,无法访问该站点