codeigniter

Codeigniter 4: Uploading files with move_uploaded_file

ぃ、小莉子 提交于 2020-08-20 03:02:17
问题 I just started moving CodeIgniter 3 project to CodeIgniter 4. Everything works fine except file upload. I would like to keep the user uploaded files in /writable/uploads. Below is the code I use to move the uploaded file to desired location. $target_dir = '/writable/uploads/recordings/'; $target_file = $target_dir . basename($_FILES["gfile"]["name"]); $FileType = pathinfo($target_file,PATHINFO_EXTENSION); if($FileType != "mp3") { $vmuploadOk = 1; } else $vmuploadOk = 1; if ($vmuploadOk == 1)

Codeigniter 4: Uploading files with move_uploaded_file

二次信任 提交于 2020-08-20 03:02:07
问题 I just started moving CodeIgniter 3 project to CodeIgniter 4. Everything works fine except file upload. I would like to keep the user uploaded files in /writable/uploads. Below is the code I use to move the uploaded file to desired location. $target_dir = '/writable/uploads/recordings/'; $target_file = $target_dir . basename($_FILES["gfile"]["name"]); $FileType = pathinfo($target_file,PATHINFO_EXTENSION); if($FileType != "mp3") { $vmuploadOk = 1; } else $vmuploadOk = 1; if ($vmuploadOk == 1)

Codeigniter join query multiple conditions don't work

廉价感情. 提交于 2020-08-19 07:47:53
问题 I want to select data from my database table with join query, but my it doesn't work. My query: $this->db->select(); $this->db->from('we'); $this->db->join('schedule', 'schedule.itemid = we.cid'); $this->db->join('schedule', 'schedule.itemtype = 'testitem''); $this->db->where('we.isActive','Y'); This line makes problem with schedule.itemtype = 'testitem' : $this->db->join('schedule', 'schedule.itemtype = 'testitem''); How can I solve this? 回答1: You don't need to join same table twice. But

How to select multiple where conditions using codeigniter?

二次信任 提交于 2020-08-10 19:19:18
问题 my table This is my table i have to display the data using multiple where conditions. First i select using dms_expire_date,for this i got answer and i am using dms_doc_name in where conditions but i didn't got correct result. I have tired so far. ] See this picture if i use "or" in "where" i got testie not within this date.but if i use "and" in "where" i didn't got result for dms_expiry_date See this picture i don't know how to do this.please help to solve this problem. SELECT * FROM `dms

番茄社区多门店系统介绍

泄露秘密 提交于 2020-08-04 17:11:49
gitee开源地址:https://gitee.com/chaituan/fanqie_shop github开源地址:https://github.com/chaituan/fanqie_shop 番茄社区多门店是一款帮助多商家线上盈利的工具,可做社区门店,也可以做社区团购,还可以做自营连锁店,内含小程序和公众号两个端,同一个后台管理。 主要功能模块:商家入住,合伙人推广,区域定位,分销裂变,积分商城,自定义海报 软件架构 本系统使用的是前后端分离的开发方式,后端采用国外优雅的CodeIgniter框架,小巧灵活安全性高非常容易上手,后台UI使用极简的LAYUI。 前端采用vue开发的uniapp框架,可发布到iOS、Android、H5、以及各种小程序(微信/支付宝/百度/头条/QQ/钉钉/淘宝)、快应用等多个平台。 一、首页排版调整 通过后台菜单 配置---首页设计,来调整图片,和位置。首页设计比较简单,后期会逐渐增加更多的DIY。 二、关于定位 首先需要在后台菜单 商家---区域管理 中添加区域。 后台可以设置定位的距离和默认位置。当用户进入系统后,系统会根据后台设置的距离来筛选离他最近的区域(地区),如果未匹配到数据,则会自动读取后台设置的默认区域。(后台有详细说明,请查看) 三、商家入住说明 商家可在手机端,申请入住。申请通过后系统会自动发PC端的帐号密码到消息中

Call to undefined function ibase_connect() in Codeigniter

半城伤御伤魂 提交于 2020-07-29 13:01:47
问题 I can not connect to a local bank in firebird. Since I enabled the following extensions in php.ini but not getting any results. extension=php_interbase.dll extension="interbase.so" extension=php_pdo_firebird.dll I have also done interbase.so download the file and copy it to the folder: /opt/lampp/lib/php/extensions/no-debug-non-zts-20131226/ I'm using: XAMPP 5.6.8 / PHP 5.6.8 (64bit) Linux 14.04 LTS (64bit) My file database.php $db['default'] = array( 'dsn' => '', 'hostname' => 'localhost',

Call to undefined function ibase_connect() in Codeigniter

 ̄綄美尐妖づ 提交于 2020-07-29 13:01:28
问题 I can not connect to a local bank in firebird. Since I enabled the following extensions in php.ini but not getting any results. extension=php_interbase.dll extension="interbase.so" extension=php_pdo_firebird.dll I have also done interbase.so download the file and copy it to the folder: /opt/lampp/lib/php/extensions/no-debug-non-zts-20131226/ I'm using: XAMPP 5.6.8 / PHP 5.6.8 (64bit) Linux 14.04 LTS (64bit) My file database.php $db['default'] = array( 'dsn' => '', 'hostname' => 'localhost',

CI ~ CodeIgniter在nginx下报错404 Not Found ,解决办法

与世无争的帅哥 提交于 2020-07-29 05:55:40
CI ~ CodeIgniter在nginx下报错404 Not Found ,解决办法 思路:linux下的/etc/nginx/conf.d,找到nginx的配置文件,修改默认配置文件为自己的新网站配置 下面ABC替换为你的网址,最后再重启服务器即可,service nginx restart ###################### Default ################################ server { listen 80; server_name www.ABC.com; index index.html index.htm index.php; root /data/wwwroot/www.ABC.com; error_log /var/log/nginx/www.ABC.com-error.log crit; access_log /var/log/nginx/www.ABC.com-access.log; include extra/*.conf; #------------- SSL Start -------------- #------------- SSL End --------------- } 来源: oschina 链接: https://my.oschina.net/u/4290163/blog/4273383

Reorder Data in Table using jquery each

女生的网名这么多〃 提交于 2020-07-23 07:42:46
问题 I have this set of data pulled from the database. The prices are different but some data are redundant. Here's the screenshot of the data. The table that I want it to look like is this. I arranged them in jQuery using .each() but what I got is an epic fail. Only the header and first body row is correct. Here's my code: var route_price_table = ''; route_price_table = '<table class="table table-bordered table-striped"><thead><tr><th>SEA</th>'; var initial_boxname = ''; var iterator = 0; var

Reorder Data in Table using jquery each

时光怂恿深爱的人放手 提交于 2020-07-23 07:41:45
问题 I have this set of data pulled from the database. The prices are different but some data are redundant. Here's the screenshot of the data. The table that I want it to look like is this. I arranged them in jQuery using .each() but what I got is an epic fail. Only the header and first body row is correct. Here's my code: var route_price_table = ''; route_price_table = '<table class="table table-bordered table-striped"><thead><tr><th>SEA</th>'; var initial_boxname = ''; var iterator = 0; var