|
|
|
ช่วยแก้โค้ดหน่อย $_db = mysql_connect('localhost', 'root', 'root') or die(' -- '); |
|
|
|
|
|
|
|
Code (PHP)
<?php
$_db = mysql_connect('localhost', 'root', 'root') or die(' -- '); mysql_select_db('NEW', $_db);
mysql_set_charset('tis620');
$_sql = sprintf("SELECT name FROM dlt_license_car WHERE id = %d", mysql_real_escape_string(25));
$_query = mysql_query($_sql ,$_db);
$_result = mysql_result($_query, 0, 0);
$_unserialized = unserialize($_result); print_r($_unserialized);
mysql_free_result($_query); mysql_close($_db);
$_f = '_serialize.txt'; if(!file_exists($_f)) touch($_f, 0777);
$_fp = fopen($_f, 'w');
$_fw = fwrite($_fp, $_serialize);
fclose($_fp);
// ----- Executed
$_fc = file_get_contents($_f);
$_unserialized = unserialize($_fc); print_r($_unserialized);
?>
Tag : - - - -
|
|
|
|
|
|
Date :
2010-07-04 12:07:02 |
By :
bank |
View :
860 |
Reply :
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
รอง echo ค่า $query ดู ครับ ว่ามีเปล่าครับ
(-random str)
|
|
|
|
|
Date :
2010-07-05 09:45:49 |
By :
alderman |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 04
|