==O:3:"Car":1:{s:4:"name";s:7:"new car";}
object(Car)#3 (1) {
["name"]=>
string(7) "new car"
}
object(Car)#3 (1) {
["name"]=>
string(7) "new car"
}
2015-10-02
$res = mysql_query('select * from user limit 1');
$row = mysql_fetch_assoc($res);
var_dump($row);
$row = mysql_fetch_assoc($res);
var_dump($row);
2015-10-01
$link = mysql_connect($host,$user,$pass);
mysql_select_db('code1');
mysql_query("set names 'utf8'");
$res = mysql_query('select * from fuck');
print_r(mysql_fetch_row($res));
mysql_select_db('code1');
mysql_query("set names 'utf8'");
$res = mysql_query('select * from fuck');
print_r(mysql_fetch_row($res));
2015-10-01
if (file_exists($fn)) {//如果文件存在
echo 'Successed!<br>';
file_put_contents($fn,'nihao');
echo file_get_contents($fn);
}
else{//否则重建
echo 'Failed!';
$counter_file = '/data/webroot/usercode/code/test2.txt';
$fn = fopen($counter_file,'wb');
file_put_contents($fn,'nihao');
echo file_get_contents($fn);
}
echo 'Successed!<br>';
file_put_contents($fn,'nihao');
echo file_get_contents($fn);
}
else{//否则重建
echo 'Failed!';
$counter_file = '/data/webroot/usercode/code/test2.txt';
$fn = fopen($counter_file,'wb');
file_put_contents($fn,'nihao');
echo file_get_contents($fn);
}
2015-09-28