2 回答

TA貢獻(xiàn)1860條經(jīng)驗(yàn) 獲得超9個(gè)贊
由于序列化數(shù)組,我可能會(huì)在 PHP 中這樣做。你應(yīng)該做一個(gè)這樣的函數(shù):
function update_my_plugins() {
$option = get_option('active_plugins'); // This will return you an array see below
$new_array = [
'something here',
'another something'
];
update_option('active_plugins', $new_array); // This will automatically reserialize
}
從那里,只需將此函數(shù)放入您的 footer.php 并訪問(wèn)您的站點(diǎn)。當(dāng)您訪問(wèn)您的網(wǎng)站時(shí)它會(huì)觸發(fā),然后您可以將其取出。

TA貢獻(xiàn)1911條經(jīng)驗(yàn) 獲得超7個(gè)贊
還是不行?。。?/p>
當(dāng)我在 PHPMyAdmin 中運(yùn)行查詢時(shí),下面顯示了一個(gè)錯(cuò)誤,我不明白為什么(它還在我的 PHP 腳本中返回一個(gè)錯(cuò)誤......:
UPDATE
wor1865_options
SET
option_value = 'a:2:{i:0;s:19:"akismet/akismet.php";i:1;s:21:"hello-dolly/hello.php";}'
WHERE
option_name = 'active_plugins'
- 2 回答
- 0 關(guān)注
- 147 瀏覽
添加回答
舉報(bào)