我收到此错误:
致命错误:调用未定义函数 update_post_meta()
我的代码如下。谁能帮我吗?
<?php if(isset($_POST['submit']))
{
$metavalue = $_POST['usertext'];
$postid = $_POST['postid'];
$metakey = 'my_key';
update_post_meta( $postid, $metakey, $metavalue );
} ?>
<div class="wrap">
<form method="POST" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<input type="hidden" name="postid" value="<?php echo $_GET['value'] ?>" >
<input type="hidden" name="123" value="123" >
<input type="text" name="usertext">
<br/>
<input type="submit" name="submit" value="Update">
</form>
</div>
<?php