Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 16,720
» Latest member: kbhombz@gmail.com
» Forum threads: 70,970
» Forum posts: 364,993

Full Statistics

Latest Threads
website Duplicating on an...
Forum: General Help
34 minutes ago
» Replies: 5   » Views: 19
How to fix routing in CI ...
Forum: CodeIgniter 3.x
1 hour ago
» Replies: 2   » Views: 22
Migration 2 -> 4 : databa...
Forum: CodeIgniter 4 Support
2 hours ago
» Replies: 0   » Views: 15
Should CodeIgniter\Log\Fi...
Forum: CodeIgniter 4 Discussion
2 hours ago
» Replies: 3   » Views: 73
cookie issue, can you hel...
Forum: General Help
4 hours ago
» Replies: 3   » Views: 62
get_filenames() behavior
Forum: CodeIgniter 4 Discussion
6 hours ago
» Replies: 1   » Views: 41
set_value() into form_mul...
Forum: CodeIgniter 4 Feature Requests
6 hours ago
» Replies: 0   » Views: 28
QR Code for CodeIgniter 4
Forum: CodeIgniter 4 Discussion
7 hours ago
» Replies: 2   » Views: 65
foreach loop in a foreach...
Forum: General Help
Yesterday, 03:35 PM
» Replies: 2   » Views: 91
Codeigniter Model VS Quer...
Forum: CodeIgniter 4 Support
Yesterday, 02:37 PM
» Replies: 2   » Views: 145

 
  website Duplicating on another website
Posted by: kbhombz@gmail.com - 1 hour ago - Forum: General Help - Replies (5)

Hi champions
I copied the files of my one codeigniter site onto another subdomain, but now when i update anything on website X it also updates on website Y, I need them to operate separately, How can I resolve this, I am still new at this.

Regards


  Migration 2 -> 4 : database
Posted by: lama - 2 hours ago - Forum: CodeIgniter 4 Support - No Replies

Hello,

I'm looking for a migration of CI2 to CI4... Well i know ... Angel

Is there a simple way to keep the database queries "as is" from CI2 in CI4 ?

For example, what I wrote in my CI2 application :

PHP Code:
$this->db->select('products.products_id, products_name, products_uri, products_ean, products_image_type, products_price, products_stock_quantity');
$this->db->from('products');
$this->db->join('products_stock''products.products_id = products_stock.products_id');
$this->db->where('products_is_displayed'1);
$this->db->where('products_image_type !=''none');
$this->db->order_by('products_time_add''desc');
$this->db->limit($limit);
$query $this->db->get();
return 
$query->result_array(); 


I want to rewrite less as possible because if an application with a huge amount of database manipulation .. Confused

Thanks


Sad How to fix routing in CI 3.2
Posted by: Saeed_Sikandar - 3 hours ago - Forum: CodeIgniter 3.x - Replies (2)

Hey I'm new to CodeIgniter and actually let me show you where I am stuck!, 
so here's the URL I requested 
  http://192.168.0.103:8080/Concept/admins/order .
admins is controller and order is method of that controller but it does'nt work like it should work 

here is my Admins Controller,route.php,some screenshot of my webpage:




Attached Files Thumbnail(s)
               

  set_value() into form_multiselect
Posted by: pbquet - 6 hours ago - Forum: CodeIgniter 4 Feature Requests - No Replies

Hello,
I use set_value() not only for input but also for select and multiselect in "form_dropdown" and "form_multiselect", and it worked well in CI3 :


PHP Code:
echo form_dropdown('id_user'$usersset_value('id_user'''));
echo 
form_multiselect('id_user[]'$users, (array)set_value('id_user''')); 

But with CI4 set_value return only string type, so it's no longer possible to use it for form_multiselect and their array value.


Do you think it would be possible to change the return type of set_value from "string" to "mixed" in order to make it possible again ?


PHP Code:
*
* @return 
string
*/
function 
set_value(string $fieldstring $default ''bool $html_escape true) : string 
will become in form_helper
PHP Code:
*
* @return 
mixed
*/
function 
set_value(string $fieldstring $default ''bool $html_escape true

thanks


  get_filenames() behavior
Posted by: MGatner - Yesterday, 05:46 PM - Forum: CodeIgniter 4 Discussion - Replies (1)

The Filesystem helper defines the get_filenames($source_dir[, $include_path = FALSE]) function, described in the User Guide:

Quote:Takes a server path as input and returns an array containing the names of all files contained within it. The file path can optionally be added to the file names by setting the second parameter to TRUE.


The function has two different return types contingent on its second parameter. The first (default) is a flat list of all files in all subdirectories:
Code:
document.txt
cat.jpg
rainbow.exe

And the second is the same files by their absolute paths:
Code:
/var/www/html/mysite/document.txt
/var/www/html/mysite/assets/cat.jpg
/var/www/html/mysite/downloads/cached/rainbow.exe

My question to you all: why would the first return type ever be useful? I keep coming back to this function forgetting its "flattening" effect and being disappointed that I can't get the relative paths:
Code:
document.txt
assets/cat.jpg
downloads/cached/rainbow.exe

The default return case is never used in the framework itself, and my opinion is that it should return the relative path instead of just the filename. With the relative path it would still be easy to acquire the flat filename, e.g. with pathinfo() and array_map().

Anyone with experience of the Filesystem helper have input?


  cookie issue, can you help me?
Posted by: michaelvuillermoz - Yesterday, 10:25 AM - Forum: General Help - Replies (3)

hello
sorry for my english, i have an unknow issue on my website:

i try to save a cart in a cookie:

var_dump of the cookie before saving :

Code:
array (size=3)
'name' => string 'cart'
'value' => string '[{"id":"13991","id_prod":"18176","qty":1,"gravure":"","options_infos":[],"cadeau":0},{"id":"13983","id_prod":"18168","qty":1,"gravure":"","options_infos":[],"cadeau":0},{"id":"13987","id_prod":"18172","qty":1,"gravure":"","options_infos":[],"cadeau":0},{"id":"279543","id_prod":"29990","qty":1,"gravure":"","options_infos":[],"cadeau":0},{"id":"279554","id_prod":"30001","qty":1,"gravure":"","options_infos":[],"cadeau":0},{"id":"279539","id_prod":"29986","qty":1,"grav ure":"","options_infos":[],"cadeau":0},{"id'... (length=3301)
'expire' => int 2592000



this php function is triggerered on my page to update the cookie cart,
this is what is blocking when i have more than approx  20 items on my cart


PHP Code:
public function refreshCookie() {
$items = array();
if (
parent::contents()) {
foreach (
parent::contents() as $key => $value) {

$prod = new stdClass();

$prod->id $value['id'];
$prod->id_prod $value['id_prod'];
$prod->qty $value['qty'];

if (isset(
$value['gravure'])){
$prod->gravure $value['gravure'];

if (isset(
$value['options_infos'])){
$prod->options_infos $value['options_infos'];
}
$prod->cadeau $value['cadeau'];
$items[] = $prod;
}
}

$cookie = array(
'name' => 'cart',
'value' => json_encode($items),
'expire' => $this->CI->config->item('cookie_panier_lifetime')
);
$this->CI->input->set_cookie($cookie);


this work fine in my local machine but not online when i have more than 20 items
it wotk if i remove the set_cookier line ($this->CI->input->set_cookie($cookie);)
also note that if i use the php setcookie it is the same, so it is not realy a codeigniter issue :/


i don't understand , any help would be appreciated
regards


  Save coordinate from html 5 geolocation
Posted by: kelapamuda - Yesterday, 09:13 AM - Forum: General Help - Replies (1)

I want to save user location when he login. The location is already shown latitude and longitude based on here https://www.w3schools.com/html/html5_geolocation.asp

But how to save long and lat from a user  into mysql?
Already google but not found suitable solution yet. 
Thanks


  CI4 sessions still not being deleted
Posted by: Fido L Dido - Yesterday, 05:54 AM - Forum: CodeIgniter 4 Support - Replies (2)

I've read the other threads on session files not being cleaned up on CI4. I am suffering the same issue, with hundreds of session files when it is only me accessing the site.

I've checked which php.ini file apache is using and have set the following values:

Code:
session.gc_probability = 1
session.gc_divisor = 1000
session.gc_maxlifetime = 1440

I've also located all other php.ini files and set the same values. I've checked my syslog and it does appear that php/sessionclean is running periodically. Beyond writing my own cleanup routine I'm at a bit of a loss as to how to fix this or even go about debugging what might be going wrong?


  Programming with CI4 framework
Posted by: Marcolino92 - Yesterday, 02:54 AM - Forum: General Help - Replies (1)

Hi, a simple inexperienced question, is it already possible to develop with the codeginiter 4 framework, exactly this? Thank you

https://github.com/codeigniter4/framework


  CRUDIgniter URLs and 404
Posted by: paulrking08 - Yesterday, 01:59 AM - Forum: Installation & Setup - Replies (1)

Good morning all

I have been through quite a number of the posts on this forum looking for an answer but despite dozens of attempts I am still stuck

I created a new CI project on Ubuntu 18.04 using apache2, php 7.2 and MySQL into /var/www/html/scribe

Before I did anything else I went to http://myserver/scribe and was presented with the CI default page

Next I used CRUDIgniter to generate code for a few tables in MySQL database and downloaded the code and merged it into /var/www/html/scribe

When I go to http://myserver/scribe I am now presented with a page with my tables in the left had bar which expand on clicking to Add and Listing. Looks very promising

If I hover over the Add link it shows http://192.168.2.128/scribe/order/add

This link does not work and returns a 404 Not Found

Two questions, therefore, first why has the server name been changed to the IP Address and second is the link /scribe/order/add correct as it seems like it ought to be http://myserver/scribe/index.php?order/add which works (well it displays the correct screen).

I have an .htacess in /var/www/html/scribe which contains a simple rewrite rule
<IfModule mod_rewrite.c>
    RewriteEngine on

    RewriteCond %{REQUEST_FILENAME} !-f

    RewriteCond %{REQUEST_FILENAME} !-d

    RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>



Any pointers would be much appreciated

Regards
Paul



  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.