Welcome Guest, Not a member yet? Register   Sign In
Search Results
    Thread: JSON response on 404
Post: RE: JSON response on 404

Yes, the answer is here: https://codeigniter.com/user_guide/incoming/routing.html?highlight=set404override#id27 (https://codeigniter.com/user_guide/incoming/routing.html?highlight=set404override#id27)
737 Views
1 Replies
06-07-2020, 11:07 PM
thingNumber1
    Thread: JSON response on 404
Post: JSON response on 404

I am creating an API and I need to response always with a JSON, including when the answer is a 404 message. Is this possible?
737 Views
1 Replies
06-07-2020, 09:20 PM
thingNumber1
    Thread: Cant set CI_ENVIRONMENT
Post: RE: Cant set CI_ENVIRONMENT

John_Betong Wrote: (06-07-2020, 06:05 PM) -- I prefer setting the  .htaccess generated $_SERVER variable in index.php. -- Both, $_SERVER and $_ENV are prefixed with `REDIRECT_`
1,768 Views
5 Replies
06-07-2020, 06:10 PM
thingNumber1
    Thread: Cant set CI_ENVIRONMENT
Post: RE: Cant set CI_ENVIRONMENT

InsiteFX Wrote: (06-07-2020, 12:39 PM) -- In order for $_ENV to work, you need to reconfigure variables_order = "GPCSE" in your php.ini -- Thank you very much. I already added the `E`. The problem i...
1,768 Views
5 Replies
06-07-2020, 01:04 PM
thingNumber1
  Exclamation Thread: Cant set CI_ENVIRONMENT
Post: Cant set CI_ENVIRONMENT

I am trying to set my environment dynamically on .htaccess file, but I cant. This is my `.htaccess` file: Code: -- # Disable directory browsing Options All -Indexes # ----------------------...
1,768 Views
5 Replies
06-07-2020, 10:48 AM
thingNumber1
    Thread: setLocale() doesn't change the language set by browser
Post: RE: setLocale() doesn't change the language set by...

To set the language you need to do this: PHP Code: -- $language = \Config\Services::language(); $language->setLocale($real_language); -- That way you won't need to set the language every single tim...
4,791 Views
4 Replies
04-26-2020, 10:48 AM
thingNumber1
    Thread: Installing Condigniter in subfolder but setting multilanguage as in root
Post: RE: Installing Condigniter in subfolder but settin...

Note: Sorry for adding more information on another post, but I was not able to edit my first post still waiting for moderation. The update: I am using this code on the .htaccess file, on the roo...
1,320 Views
1 Replies
04-19-2020, 05:36 PM
thingNumber1
    Thread: Installing Condigniter in subfolder but setting multilanguage as in root
Post: Installing Condigniter in subfolder but setting mu...

Hi, I have a Wordpress multilanguage installation in `example.com` When I go to `example.com/en/` I see the website in English and when I go to `example.com/es/` I see the website in Spanish. ...
1,320 Views
1 Replies
04-19-2020, 04:47 PM
thingNumber1
  Thumbs Up Thread: Validation: in_db[table.field]
Post: Solución

I created the feature and here (https://github.com/codeigniter4/CodeIgniter4/pull/2392) is the Pull Request.
3,382 Views
4 Replies
11-08-2019, 03:07 PM
thingNumber1
    Thread: Validation: in_db[table.field]
Post: RE: Validation: in_db[table.field]

Is the opposite.  While `is_unique` returns an error message if the value exist in the DB and continues if the value does not exist. `in_db` might return the error if the values does not exists and s...
3,382 Views
4 Replies
11-06-2019, 07:48 PM
thingNumber1
    Thread: Validation: in_db[table.field]
Post: Validation: in_db[table.field]

Imagine that you have a list of fruits in your database and your users need to select their favorite fruits (but it must be a fruit that previously existed in the database) ... Currently, to valida...
3,382 Views
4 Replies
10-27-2019, 12:26 PM
thingNumber1

Theme © iAndrew 2016 - Forum software by © MyBB