Class Gb2utf8
{
var $gb; GB2312 string to convert
var $utf 8; Converted UTF8 String
var $CodeTable; An array of GB2312 code files used in the conversion process
var $ErrorMsg; Error messages during the conversion process
function Gb2utf8 ($InStr = "")
{
$this->gb= $InStr;
$this->setgb2312 ();
($this->gb== "")? 0: $this->convert ();
}
function SetGb
gb2utf8.php files are as follows:
Copy Code code as follows:
Class Gb2utf8
{
var $gb; GB2312 string to be converted
var $utf 8; Converted UTF8 String
var $CodeTable; Array of GB2312 code files used during conversion
var $ErrorMsg; Error messages during the conversion process
function Gb2utf8 ($InStr = "")
{
$this->gb= $InStr;
$this->setgb2312 ();
($this->gb== "")? 0: $this->convert (
ASP Tutorial Delete database tutorial Records in fact, in the ASP is very easy to do things, as long as the connection to the database, and then use the SQL Delete function to delete the OK, let's take a look at the example.
id = saferequest ("id")Sql= "Delete from table1 where whereid>" id "Rs.Open sql,conn,1,3Response.Write ""Set rs=nothingSet conn=nothing
This is the filter illegal character function
Function Saferequest (paraname) Dim paravalue Paravalue=request (paraname) If IsNumeri
currently integrated only with Microsoft's IIS Web server.
NCR TERADATANCR Teradata is the most powerful competitor in the high-end data warehousing market, mainly running on the UNIX operating system platform of NCR Worldmark SMP hardware. In 1998, the company also provided Windows NT based Teradata, an attempt to open up the Data Mart Market (Mart). In genera
database.To sum up, the defense against SQL injection is to pay attention to the security when writing code, so we should not only seek efficiency, but not security. Below is an example of a web page (ASP, if SQL Injection exists in the above filter, we will fix it. Here we write an ASP function for your reference:Function SafeRequest (ParaName)Dim ParaValueParaValue = Request (ParaName)If IsNumeric (ParaValue) = True thenSafeRequest = ParaValueExit FunctionElseIf
id = saferequest ("id")
Sql= "Delete from table1 where whereid>" id "
Rs.Open sql,conn,1,3
Response.Write ""
Set rs=nothing
Set Conn=nothing
' This is the filter illegal character function
function Saferequest (paraname)
Dim paravalue
Paravalue=request (Paraname)
If IsNumeric (paravalue) = True Then
Saferequest=paravalue
Exit function
ElseIf InStr (LCase (Paravalue), "select") > 0 or InStr
function function Sqlcheck (str,errtype)
If INSTR (LCase (str), "select") > 0 or INSTR (LCase (str), "insert") > 0 or INSTR (LCase (str), "delete") > 0 or Instr (LCase (str), "delete from") > 0 or INSTR (LCase (str), "Count (") > 0 or IN
solution to the injection-type attack prevention code, for everyone to learn the reference!
JS version of the prevention of SQL injection attack code ~:
[CODE START]
var url = location.search;
var re=/^\? (.*) (Select%20|insert%20|delete%20from%20|count\ (|drop%20table|update%20truncate%20|asc\ (|mid\ |char\ (|xp_cmdshell |exec%20master|net%20localgroup%20administrators|\ "|:| Net%20user|\ ' |%20or%20) (. *) $/gi;
var e = re.test (URL);
if (e) {
Alert ("The address contains illegal characters
As follows:
Create or replace procedure p_xlstooracle is
V_file utl_file.file_type;
Out_v varchar2 (4000 );
V_id number;
V_service_competition number;
V_cu_market_share number (6, 4 );
V_ct_market_share number (6, 4 );
V_cm_market_share number (6, 4 );
V_other_market_share number (6, 4 );
Begin
If utl_file.is_open (v_file) then
Utl_file.fclose (v_file );
End if;
V_file: = utl_file.fopen ('utl _ file_dir ',' I _exch_info2.xls ', 'R ');
Loop
Begin
Utl_file.get_line (v_file, out_v );
Exception
When
Sql| News | attack | Web page
Recently because of the modification of an ASP program (with SQL injection vulnerability), in the online search for a number of related prevention methods, are not nearly satisfactory, so I will now some of the online methods to improve a little, write this ASP function, for your reference.
Function Saferequest (Paraname)Dim ParavalueParavalue=request (Paraname)If IsNumeric (paravalue) = True ThenSaferequest=paravalueExit FunctionElseIf
connection. This connection needs to provide all the information connected to the database, identifies the specific database type and the method of connection established, and provides the information required by the database management system, such as user name and password.IBM Cognos Data Manager supports multiple vendor database management systems, including: Ibm,oracle,microsoft,informix,sybase and Teradata, and can connect to other databases usi
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.