class changeValueTo1 : public changeValue
{
public:
changeValueTo1(General * p) : _parent(p) {}
~changeValueTo1() {}
void Change();
private:
General * _parent;
};
void changeValueTo1::Change()
{
//должен изменить значение параметра a объекта класса MyClass на 1
_parent->a = 5;
}
MyClass::MyClass() {
object = new changeValueTo1(this);
}
if ($request_filename !~ "\.(js|htc|ico|gif|jpg|png|css)$") {
rewrite ^(.*) /index.php last;
}
<?php
$s = 'string|name1,value1|name2,value2|name3,value3';
$b = array();
foreach( explode('|', $s) AS $e ) {
list($k, $v) = explode(',', $e);
$b[$k] = $v;
}
?>
$b: Array
(
[string] =>
[name1] => value1
[name2] => value2
[name3] => value3
)
$.ajax({
url: url,
dataType: 'json',
async: false,
data: data,
success: callback
});