this-> DeleteFromConfig

(Caronte Pcode version 2.0)

Description

void this-> DeleteFromConfig (string label, string key);

Remove the value of the label in the key section of the config file .

Example.

Source:

Config file:

[DNS]
nameserver_3=151.99.125.4
nameserver_2=151.99.125.3
nameserver_1=151.99.125.2

CS_ADMIN_SCRIPT this = new CS_ADMIN_SCRIPT($_this);

int Main(CAdminRequest pRequest, CAdminResponse pResponse)
{

this->DeleteFromConfig("DNS","nameserver_3");
this->WaitForReplaceConfig();
this->SaveConfig();


return 0;

}



Out:

Config file:

[DNS]
nameserver_2=151.99.125.3
nameserver_1=151.99.125.2