info

thinkphp PATH_INFO支持

筅森魡賤 提交于 2019-12-04 08:38:32
如果发生在本地测试正常,但是一旦部署到服务器环境后会发生只能访问首页的情况,很有可能是你的服务器或者空间不支持PATH_INFO所致。 系统内置提供了对PATH_INFO的兼容判断处理,但是不能确保在所有的环境下面都可以支持。如果你确认你的空间不支持PATH_INFO的URL方式的话,有下面几种方式可以处理: 大理石平台检定规程 修改URL_PATHINFO_FETCH配置参数 新版内置了通过对 ORIG_PATH_INFO , REDIRECT_PATH_INFO , REDIRECT_URL 三个系统$_SERVER变量的判断处理来兼容读取$_SERVER['PATH_INFO'],如果你的主机环境有更特殊的设置,可以修改URL_PATHINFO_FETCH参数,改成你的环境配置对应的PATH_INFO的系统变量兼容获取名称,例如: 'URL_PATHINFO_FETCH' => 'ORIG_PATH_INFO,REDIRECT_URL,其他参数…' 如果你的环境没有任何对应的系统变量,那么可以封装一个获取方法,例如: function get_path_info (){ // 根据你的环境兼容获取PATH_INFO 具体代码略 return $path ; // 直接返回获取到的PATH_INFO信息 } 然后我们修改下URL_PATHINFO_FETCH参数的配置值,改为:

json.loads() json解码

隐身守侯 提交于 2019-12-04 08:25:33
有些json数据里面套着json 一次json.loads()后还是会有数据是json格式 { "result": { "error_code": 0, "error_message": "" }, "items": [ { "3rd_class": "", "4th_class": "", "FGZ_num": "", "IBar_num": "", "Kuaiba_num": "", "MZD_num": "", "Ruiqi_num": "", "WWDS_num": "", "WZKC_num": "", "XS_num": "", "YGX_num": "", "YY_num": "", "acc_exe_paths": "game.exe;game_2001006.exe", "access_rail_sdk": "", "accl_vip_level": "", "activation_machine_limit_per_day": "", "activity_state": 0, "app_img_cover": "", "auto_exit": "0", "auto_show_cross_default": "", "auto_sync_profile_default": "1", "auto_update_default_setting": "0",

Pymysql的常见使用方法

故事扮演 提交于 2019-12-04 07:57:58
cursor.fetchone()与cursor.fetchall()的区别: cursor.fetchone():只能显示一个数据 cursor.fetchall():才能显示查出来的所有数据 Pymsql的其他常用方法 import pymysql #连接数据库 db = pymysql.connect("localhost","admin","Cesare@qq","dbpymysql") #使用cursor()方法创建一个游标对象 cursor = db.cursor() #使用execute()方法执行SQL语句 cursor.execute("SELECT * FROM order_info") # 使用fetchone() 获取一条结果数据 result = cursor.fetchone() # 只显示一行结果 #使用fetall()获取全部结果数据 data = cursor.fetchall() #关闭游标和数据库的连接 cursor.close() db.close() # 更新SQL cursor.execute(sql) db.commit() 来源: https://www.cnblogs.com/CesareZhang/p/11846883.html

SpringBoot之ActiveMQ实现延迟消息

荒凉一梦 提交于 2019-12-04 07:10:03
一、安装activeMQ ​ 安装步骤参照网上教程,本文不做介绍 二、修改activeMQ配置文件 ​ broker新增配置信息 schedulerSupport="true" <broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" dataDirectory="${activemq.data}" schedulerSupport="true" > <destinationPolicy> <policyMap> <policyEntries> <policyEntry topic=">" > <!-- The constantPendingMessageLimitStrategy is used to prevent slow topic consumers to block producers and affect other consumers by limiting the number of messages that are retained For more information, see: http://activemq.apache.org/slow-consumer-handling.html --> <pendingMessageLimitStrategy>

海边拾贝,第三方专栏文章

对着背影说爱祢 提交于 2019-12-04 06:56:18
收录一些优秀的专栏文章,或者解决某类知识点的文章: Linux高性能服务器编程: https://blog.csdn.net/gatieme/column/info/high-per-server https://blog.csdn.net/liuxuejiang158/column/info/net123 Linux多线程编程C++: https://blog.csdn.net/liuxuejiang158/column/info/linux-cpp 来源: https://www.cnblogs.com/music-liang/p/11844866.html

路飞-前台课程页面

强颜欢笑 提交于 2019-12-04 06:54:39
课程组件 <template> <div class="course"> <Header></Header> <div class="main"> <!-- 筛选条件 --> <div class="condition"> <ul class="cate-list"> <li class="title">课程分类:</li> <li :class="filter.course_category==0?'this':''" @click="filter.course_category=0">全部</li> <li :class="filter.course_category==item.id?'this':''" v-for="item in category_list" @click="filter.course_category=item.id" :key="item.name">{{item.name}} </li> </ul> <div class="ordering"> <ul> <li class="title">筛        选:</li> <li class="default" :class="(filter.ordering=='id' || filter.ordering=='-id')?'this':''" @click="filter.ordering='

javaScript(Date与Math的API)

青春壹個敷衍的年華 提交于 2019-12-04 06:50:06
目录 Math Math的两个属性值 E PI abs(); ceil(); floor(); round(); max(); min (); pow(); random sin(); cos(); tan(); sqrt(); Date 日期 new Date(); getFullYear(); getMonth(); getDate(); getHours(); getMinutes getSeconds(); getMillisconds(); getTime(); toLocaleString(); parse(); Math Math的两个属性值 E E为一个 常量 ,其值为2.7182818 PI PI为 圆周率 , 值为3.1415926 abs(); 绝对值 var a = - 29.3; var info = Math.abs(a); console.log(info);//29.3 ceil(); 向上取整 var a = -35.23; var info1 = Math.ceil(a);//-35 var b = 35.23; var info2 = Math.ceil(b);//36 floor(); 向下取整 var a = -25.23; var info1 = Math.floor(a);//-26 var b = 25.23; var info2 =

MySQL分析数据运行状态利器【show full processlist】

こ雲淡風輕ζ 提交于 2019-12-04 06:39:30
原文地址: https://www.cnblogs.com/shihuc/p/8733460.html 今天的主角是: SHOW [FULL] PROCESSLIST show full processlist; 官方文档的描述如下: SHOW PROCESSLIST shows you which threads are running. You can also get this information from the INFORMATION_SCHEMA PROCESSLIST table or the mysqladmin processlist command. If you have the PROCESS privilege, you can see all threads. Otherwise, you can see only your own threads (that is, threads associated with the MySQL account that you are using). If you do not use the FULL keyword, only the first 100 characters of each statement are shown in the Info field.

python监控cpu 硬盘 内存

隐身守侯 提交于 2019-12-04 06:34:17
import psutil import time import yagmail def sendmail(subject,contents): yag = yagmail.SMTP(user='155xxx8589@163.com',password='邮箱授权码',host='smtp.163.com') yag.send(to='15534828589@163.com',subject=subject,contents=contents) yag.close() def cpu(): cpu = psutil.cpu_percent(1) return {'cpu_percent':cpu} def mem(): mem_total = psutil.virtual_memory()[0] mem_percent = psutil.virtual_memory()[2] return {'mem_total':int(mem_total/1024/1024),'mem_percent':mem_percent} def disk(): disk_total = psutil.disk_usage('c:')[0] disk_percent = psutil.disk_usage('c:')[3] return {'disk_total':int(disk_total/1024

Tomcat启动时卡在“INFO: Deploying web application directory ......”的解决方法

江枫思渺然 提交于 2019-12-04 06:30:35
第一次遇到Tomcat在 Linux 服务器启动卡住的情况,情况很简单,tomcat启动以后卡在INFO: Deploying web application directory ......这句话,具体会卡多久就没 测试 了。google、baidu都没找到解决方法。 幸亏UCloud的技术支持人员给出了解决方案。 找到jdk1.x.x_xx/jre/lib/security/ Java .security文件,在文件中找到securerandom.source这个设置项,将其改为: securerandom.source=file:/dev/./urandom 这时候根据修改内容就可以查到因为此原因不仅可以造成tomcat卡住,也会造成weblogic启动缓慢, linux或者部分unix系统提供随机数设备是/dev/random 和/dev/urandom ,两个有区别,urandom安全性没有random高,但random需要时间间隔生成随机数。jdk默认调用random。 再后来,终于在weblogic的官方文档中 Monitoring and Troubleshooting 找到了 Avoiding JVM Delays Caused By Random Number Generation 这样一个标题。摘录如下: The library used for random