Skip to content

Instantly share code, notes, and snippets.

LIKE % 1+ Character
LIKE _ 1 Character
<?php
$test1 = 1234;
$test2 = 5678;
echo "test1:'$test1', test2:'$test2'";
?>
==>output
test1:'1234', test2:'5678'
create user:
CREATE USER 'newuser'@'localhost'
IDENTIFIED BY 'password';
grant privileges:
GRANT ALL PRIVILEGES ON your_database.tables
TO 'newuser'@'localhost';
-- 2in1:
GRANT SELECT ON auth.*
codes:
atom-beautify
atom-ternjs
emmet
markdown-assistant
color_display: pigments
markdown-preview
theme:
atom-material
seti-syntax
From:http://www.ahlinux.com/php/12992.html
<?php
//Example_1
$query = sprintf("SELECT * FROM Users where UserName='%s' and Password='%s'",
mysql_real_escape_string($Username),
mysql_real_escape_string($Password));
mysql_query($query);
//Example_2
$db = new mysqli("localhost", "user", "pass", "database");
>https://github.com/nswbmw/N-blog/wiki/第1章--一个简单的博客
ejs 的标签系统非常简单,它只有以下三种标签:
<% code %>:JavaScript 代码。
<%= code %>:显示替换过 HTML 特殊字符的内容。
<%- code %>:显示原始 HTML 内容。
@a1exlism
a1exlism / Windows_users
Last active July 19, 2016 14:24
windows authority
From: http://blog.csdn.net/luckyp/article/details/3929895
Built-in user group:
Administrators: 无法删除, 系统管理员, 域管理员也具有管理员权限
Guests: -> Guest
Power users: 介于Administrators和Users
可以:创建、删除、更改本地用户帐户, 创建、删除、管理本地计算机内的共享文件夹与共享打印机,自定义系统设置,例如更改计算机时间、关闭计算机等
不可以: 更改Administrators与Backup Operators,`无法夺取文件的所有权`、无法备份与还原文件、无法安装删除与删除设备驱动程序、`无法管理安全与审核日志`.
Backup operators: 备份还原
@a1exlism
a1exlism / linux_pipe
Created July 20, 2016 17:25
linux pipe
Linux中标准输入为0,标准输出为1,标准错误输出为2
$./a.out 0 就是测试标准输入是否可读。因为默认标准输入是终端,终端是可读可写的。故输出为read write
$ ./a.out 0 < /dev/tty 实际是$ ./a.out 0 0< /dev/tty是把/dev/tty重定向为标准输入,而/dev/tty是只读的,……
系统数据:
user() 当前用户
database() 当前数据库
version() SQL版本号,最后为系统版本(nt-windows)
@@datadir 数据库路径
连接型:
concat() concat(username,0x3a, password))
group_concat() select group_concat(DISTINCT file_priv, user) from mysql.user; //多个用户情况下, 查看load_file()权限
concat_ws() 与上类似
编码:
if __name__ == '__main__'
判断是否是在直接运行该.py文件
__name__ 算是个全局变量, 如果为直接运行 python SELF.py 则判断为1
//--- delay---//