我正在尝试访问db wp,但是从php,这是一个操作,我已经用相同的脚本做了很多次它,但这次我获得不能使用scalare值作为数组最近这段代码,为什么?我不明白。
$dbcnx = @mysql_connect('localhost', 'xxxxxxxxxxxxxxxxx', 'xxxxxxxxxxxxxxxxxxxx');
if (!$dbcnx) {
exit('<p>poroppoppopopero ' .
'this is the time of war.</p>');
}
if (!@mysql_select_db('xxxxxxxxxxxxxxxx')) {
exit('<p>Unable to locate the joke ' .
'database at this time pe pe pe pe pe pe pe</p>');
}
$result= @mysql_query ("SELECT * FROM wp_posts ORDER BY ID DESC LIMIT 0, 30");
if (!$result){
exit ('inserimento non avvenuto'.mysql_error());
}
$cont1=1;
$cont2=1;
$cont3=1;
while ($row=mysql_fetch_array($result)){
$id[$cont1]= $row['ID'];