เพื่อ ?
ส่วนนี้ให้คุณดูโพสต์ทั้งหมดของสมาชิกท่านนี้ (เฉพาะโพสต์ในส่วนที่คุณมีสิทธิ์เข้าถึง)
เมนู แสดงโพสต์


procedure TForm1.btnDat2XmlClick(Sender: TObject);
var
XMLDoc: TXMLDocument;
Node1: IXMLNode;
Node2: IXMLNode;
MyStream: TMemoryStream;
i: integer;
begin
if FileExists('.\GoodsSale_Tw.dat') then begin
XMLDoc := TXMLDocument.Create(nil);
XMLDoc.Active := True;
XMLDoc.Version := '1.0';
XMLDoc.Encoding := 'GB2312';
XMLDoc.Options := [doNodeAutoCreate, doNodeAutoIndent, doAttrNull, doAutoPrefix, doNamespaceDecl];
XMLDoc.DocumentElement := XMLDoc.CreateNode('table');
myStream := TMemoryStream.Create;
myStream.LoadFromFile('.\GoodsSale_Tw.dat');
Count := (myStream.Size - 40) div 10;
//myStream.ReadBuffer(Head[0], 10);
MyStream.Position := 10;
for i := 0 to Count - 1 do
begin
new(Pgshop);
MyStream.Read(Pgshop^, sizeof(gshop_info));
Node1 := XMLDoc.DocumentElement;
Node2 := Node1.AddChild('row');
if ((i + 1) mod 2) <> 0 then begin
Node2.SetAttributeNS('大类', '', Pgshop^.a1 xor $72);
Node2.SetAttributeNS('位置', '', Pgshop^.a2 xor $67);
Node2.SetAttributeNS('物品ID', '', Pgshop^.a3 xor $AA13);
Node2.SetAttributeNS('折叠数量', '', Pgshop^.a5 xor $86);
Node2.SetAttributeNS('价格', '', Pgshop^.a6 xor $DFB0);
Node2.SetAttributeNS('功能1', '', Pgshop^.a8 xor $C2);
Node2.SetAttributeNS('功能2', '', Pgshop^.a9 xor $C8);
Node2.SetAttributeNS('标识', '', Pgshop^.a10 xor $9D);
end else begin
Node2.SetAttributeNS('大类', '', Pgshop^.a1 xor $4E);
Node2.SetAttributeNS('位置', '', Pgshop^.a2 xor $B0);
Node2.SetAttributeNS('物品ID', '', Pgshop^.a3 xor $D103);
Node2.SetAttributeNS('折叠数量', '', Pgshop^.a5 xor $BC);
Node2.SetAttributeNS('价格', '', Pgshop^.a6 xor $8E05);
Node2.SetAttributeNS('功能1', '', Pgshop^.a8 xor $07);
Node2.SetAttributeNS('功能2', '', Pgshop^.a9 xor $92);
Node2.SetAttributeNS('标识', '', Pgshop^.a10 xor $80);
end;
end;
//myStream.ReadBuffer(LastRecord, 10);
//myStream.ReadBuffer(Bottom[0], 20);
XMLDoc.SaveToFile('.\GoodsSale_Tw.xml');
XMLDoc.Free;
myStream.Free;
end;
end;
procedure TForm1.btnXml2DatClick(Sender: TObject);
var
XMLDoc: TXMLDocument;
Node, Node1: IXMLNode;
MyStream: TMemoryStream;
i, Count: integer;
begin
if FileExists('.\GoodsSale_Tw.xml') then begin
XMLDoc := TXMLDocument.Create(Application);
XMLDoc.LoadFromFile('.\GoodsSale_Tw.xml');
XMLDoc.Active := True;
Node := XMLDoc.DocumentElement;
Count := Node.ChildNodes.Count;
myStream := TMemoryStream.Create;
myStream.Write(Head[0], Length(Head));
for i := 0 to Count - 1 do begin
Node1 := XMLDoc.DocumentElement.ChildNodes[i];
new(Pgshop);
if ((i + 1) mod 2) <> 0 then begin
Pgshop^.a1 := Byte(StrToInt(Node1.Attributes['大类'])) xor $72;
Pgshop^.a2 := Byte(StrToInt(Node1.Attributes['位置'])) xor $67;
Pgshop^.a3 := StrToInt(Node1.Attributes['物品ID']) xor $AA13;
Pgshop^.a5 := Byte(StrToInt(Node1.Attributes['折叠数量'])) xor $86;
Pgshop^.a6 := StrToInt(Node1.Attributes['价格']) xor $DFB0;
Pgshop^.a8 := Byte(StrToInt(Node1.Attributes['功能1'])) xor $C2;
Pgshop^.a9 := Byte(StrToInt(Node1.Attributes['功能2'])) xor $C8;
Pgshop^.a10 := Byte(StrToInt(Node1.Attributes['标识'])) xor $9D;
end else begin
Pgshop^.a1 := Byte(StrToInt(Node1.Attributes['大类'])) xor $4E;
Pgshop^.a2 := Byte(StrToInt(Node1.Attributes['位置'])) xor $B0;
Pgshop^.a3 := StrToInt(Node1.Attributes['物品ID']) xor $D103;
Pgshop^.a5 := Byte(StrToInt(Node1.Attributes['折叠数量'])) xor $BC;
Pgshop^.a6 := StrToInt(Node1.Attributes['价格']) xor $8E05;
Pgshop^.a8 := Byte(StrToInt(Node1.Attributes['功能1'])) xor $07;
Pgshop^.a9 := Byte(StrToInt(Node1.Attributes['功能2'])) xor $92;
Pgshop^.a10 := Byte(StrToInt(Node1.Attributes['标识'])) xor $80;
end;
myStream.Write(Pgshop^, SizeOf(gshop_info));
end;
myStream.Write(LastRecord[0], Length(LastRecord));
myStream.Write(Bottom[0], Length(Bottom));
myStream.SaveToFile('.\GoodsSale_Tw1.dat');
myStream.Free;
end;
end;
อ้างถึงจาก: 9wong ใน 15 ตุลาคม 2015, 20:21:07
วิธีแก้ตามนี้ครับ ลองอ่าน doc ดูครับ
https://www.owasp.org/index.php/XPATH_Injection

ขอบคุณครับ )





อ้างถึงจาก: icez ใน 07 พฤษภาคม 2015, 11:18:10อ้างถึงจาก: id09318 ใน 07 พฤษภาคม 2015, 07:55:45เอ่อ ผมเขียนผิดนิดหน่อยอ้างถึง<?php print iconv('TIS-620', 'UTF-8', $MartList->fields ["itemname"];) ?>
ลองแล้วครับ ไม่ได้ //หน้า item หายไปเลย
ลองอันนี้ฮะ<?php print iconv('TIS-620', 'UTF-8', $MartList->fields ["itemname"]); ?>
แล้วก็อีด้านบนที่เป็น function mysql น่ะไม่ต้องไปสนใจเลยครับ พวก***ไม่อ่านกระทู้
เจ้าของกระทู้ใช้ mssql server ไม่ใช่ mysql อย่าเสือกมาแนะนำอะไรที่เกี่ยวกับ mysql สิวะ
อ้างถึงจาก: tamuraki ใน 07 พฤษภาคม 2015, 08:30:54
mysql_query("SET NAMES UTF8");
ลองใส่แบบนี้ครับ ก๊อป ไปเลยก็ได้ครับ

อ้างถึงWarning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\Users\Admin\Desktop\web\web.config.php on line 3
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in C:\Users\Admin\Desktop\web\web.config.php on line 3
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\Users\Admin\Desktop\web\web.config.php:3) in C:\Users\Admin\Desktop\web\web.config.php on line 5
Warning: Cannot modify header information - headers already sent by (output started at C:\Users\Admin\Desktop\web\web.config.php:3) in C:\Users\Admin\Desktop\web\web.config.php on line 6
อ้างถึงจาก: tatwizard ใน 07 พฤษภาคม 2015, 08:24:51
ใน QUERY ครับ
char_name COLLATE Thai_CI_AS as char_name
น่าจะได้เลย
