2 回答

TA貢獻1860條經驗 獲得超9個贊
由于序列化數組,我可能會在 PHP 中這樣做。你應該做一個這樣的函數:
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
}
從那里,只需將此函數放入您的 footer.php 并訪問您的站點。當您訪問您的網站時它會觸發,然后您可以將其取出。

TA貢獻1911條經驗 獲得超7個贊
還是不行!?。?/p>
當我在 PHPMyAdmin 中運行查詢時,下面顯示了一個錯誤,我不明白為什么(它還在我的 PHP 腳本中返回一個錯誤......:
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 關注
- 155 瀏覽
添加回答
舉報