liu21st / extend Goto Github PK
View Code? Open in Web Editor NEWThinkPHP扩展中心,欢迎大家提交!
Home Page: http://thinkphp.cn/extend
ThinkPHP扩展中心,欢迎大家提交!
Home Page: http://thinkphp.cn/extend
如:
$mode = M('myfriends', null, 'friends_db');
配置文件friends_db没有问题,但该方法会报数据库链接错误。
经过调试发现是CLI模式下DB::parseConfig
方法有问题,对比常规模式下的DB::parseConfig
,该方法没有对$db_config
不为空时的数组key
名进行转换。
跟随fedora版本库升级了php-pecl-mongo(stable
现在MongoCollection各种操作最后一个参数都变成option数组了
于是如果用新的驱动的话
DbMongo.class.php第196行的两个调用会出错
我不知道以前这个参数是什么意思……似乎是把true直接删掉就行?
http://tpcluster.duapp.com/
官方demo.
error: [2] ini_set() [<a href='function.ini-set'>function.ini-set</a>]: ini_set varname[session.auto_start] is not in allowed modify
.
出问题方法:
public function escapeString()
问题描述:
在PgSql数据库中,插入数据的时候如果字符串中带有单引号转义后SQL语句错误,修改如下:
public function escapeString($str) {
switch($this->dbType) {
case 'MSSQL':
case 'SQLSRV':
case 'MYSQL':
return addslashes($str);
case 'IBASE':
case 'SQLITE':
case 'ORACLE':
case 'OCI':
return str_ireplace("'", "''", $str);
case 'PGSQL':
$str = addslashes($str);
$str = str_replace('\'','\''',$str);
return $str;
}
}
因为最近项目需要使用SQLite库,所以我做了一版基于SQLite的程序,在使用中发现,部分读库操作会产生无法获取获取数据的情况,仔细排查发现是在Pdo类的getFields方法中,遍历结果时,使用了
$name= strtolower(isset($val['field'])?$val['field']:$val['name']);
这一句,导致所有字段名被改写为小写,我不大清楚此处予以何为?
删除strtolower后,基本很多操作就正常了。请问有什么隐患之类的么?
建议把Extend中的所有文件直接放在仓库根目录下,同时把仓库名extend改为Extend。这样就可以直接CLONE到本地ThinkPHP文件夹下了,而且保持了正确的目录结构。现在的情况CLONE时成了ThinkPHP/extend/Extend/...
主要是3.1的图片上传实例化方式已经不同了,想了解一下,谢谢~
在使用
'LOAD_EXT_CONFIG' => 'user,db', // 加载扩展配置文件
这样的扩展配置上传到sae后,扩展的配置都读取不到,把扩展配置文件写进config.php后就没问题。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.