Php 更新文章内容中的链接

Php 更新文章内容中的链接,php,wordpress,plugins,Php,Wordpress,Plugins,我正在使用wp\u extract\u url从帖子中获取链接,并尝试更新内容 $post_edit = get_post( $editID ); $title = $post_edit->post_title; $content = $post_edit->post_content; $new_link= $_POST['link']; $old_link= $_POST['or_val'];

我正在使用
wp\u extract\u url
从帖子中获取链接,并尝试更新内容

      $post_edit = get_post( $editID ); 
      $title = $post_edit->post_title;
      $content = $post_edit->post_content;
          $new_link= $_POST['link'];
          $old_link= $_POST['or_val'];
          foreach( $new_link as $key => $n ) {
              print "full link: ".$n." <br> Short Link: ".$or_val[$key];
              $content = str_replace($old_link[$key], $n, $content);
            } 
$post\u edit=get\u post($editID);
$title=$post\u edit->post\u title;
$content=$post\u edit->post\u content;
$new_link=$_POST['link'];
$old_link=$_POST['or_val'];
foreach($key=>$n的新链接){
打印“完整链接:.$n.”
短链接:.$or_val[$key]; $content=str\u replace($old\u link[$key],$n$content); }
获取错误

致命错误:第809行C:\Program Files\Ampps\www\wordpress\wp includes\functions.php中允许的内存大小为268435456字节(尝试分配421888字节)


809是哪一行?wp_extract_url()函数出错这无助于调试。显示受影响的代码行。正如错误所说,PHP希望分配更多内存,但限制为256 MB。也许你只需要增加它。