-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest.php
More file actions
34 lines (29 loc) · 918 Bytes
/
test.php
File metadata and controls
34 lines (29 loc) · 918 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
include '../config/config.php' ;
if( password_verify('22222222','$2y$10$NQxKq2EAalb2bGOh02urWet67G3AV.XktdQHh6LxsI2YvRvPGrCxu') ) {
echo "OK\n" ;
} else { echo "NO";} ;
exit ;
/*
$db = new Db() ;
$val = array(
array('num'=>444444444,'name'=>'qqqqsssss','id'=>6),
array('name'=>'mymy','num'=>3434,'id'=>4),
array('num'=>444444444,'name'=>'qqqqsssss','id'=>5)
) ;
$fld = array('id','name','num') ;
$db->insert('test',$fld,$val) ;
$res = $db->q("SELECT * FROM test") ;
print_r ($res) ;
/*
$ar = array(array(1,2,3,'"ok"'),array(4,5,6,'"no"')) ;
print_r(array_merge_recursive($ar)) ;
/*
$one = '(' . implode(',', array_fill(0,count($ar[0]),'?')) . ')' ;
$val_place = implode(',',array_fill(0,count($ar),$one)) ;
print $val_place ;
*/
function strip($str) {
return preg_replace('/[^a-zA-Zа-яА-Я0-9_ ]/u','',$str) ;
}
echo strip("qwe йцу qwerrr $#@!~ ФЫВ^&*(){}|ДЖ 097") ;