php解析语法错误在线83,PHP - 解析错误:语法错误,意外'['

也许我开始失明,但我有一个问题,杀了我,

我有下一个功能,我得到这个错误信息:

Parse error: syntax error, unexpected '[' in

/home/largo/public_html/dev/wp-content/plugins/email-key/email-key.php

on line 28

在这一行中:

$ to = components ['recipient'];

我不明白为什么。

function get_form_components($components) {

global $wpdb;

$table = $wpdb->prefix . "ebk";

$components['ebk_key'] = md5(microtime());

$sql = build_sql_insert($table,$components);

if ($wpdb->query($sql) === FALSE) {

//return FALSE;

} else {

$to = components['recipient'];

$subject = "A message from the website " . get_bloginfo( 'name' );

$message = "Hello,\n you getting this message because your email used in the contact form in this site: \n

the message didn\'t sent yet and it\'s waiting in a Message queue, for the message actually will send please press the

folowing link:\n " .$components['ebk_key'] . "\n Thanks you\n " . get_bloginfo( 'name' );

@wp_email($to,$subject,$message);

}

$dummy_components = $components;

$dummy_components['recipient'] = 'hold-this-please@wpcoder.co.il';

return $dummy_components;

}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值