Welcome Guest, Not a member yet? Register   Sign In
Search Results
    Thread: conditional routing (shorten url)
Post: RE: conditional routing (shorten url)

Because it's config file, it doesn't have access to database. While it might feel a bit "hacky", you could set up 404 controller, and if route fails, you could still catch it and deal with it, if i...
3,666 Views
8 Replies
01-27-2019, 12:49 PM
Pertti
    Thread: PHPbenchmarks.com
Post: RE: PHPbenchmarks.com

How's that project going, any updates? :P
17,283 Views
23 Replies
01-25-2019, 11:44 AM
Pertti
    Thread: CI to progressive web app
Post: RE: CI to progressive web app

You can place these files next to your index.php file, and then they will be available from www.yourdomain.com/upup.min.js Or, if you want to give it a specific subdirectory URL, you could create a...
8,505 Views
3 Replies
01-25-2019, 11:43 AM
Pertti
    Thread: include view in parser
Post: RE: include view in parser

Ah, so you are using new templating engine? https://codeigniter4.github.io/CodeIgniter4/outgoing/view_parser.html I guess it depends on what kind of PHP code you want to put in your view file, but ...
8,294 Views
8 Replies
01-09-2019, 01:34 AM
Pertti
    Thread: Input 4 first digit from column A to column B
Post: RE: Input 4 first digit from column A to column B

So you want to access first 4 digits, regardless of what the number is? Could probably get away with using string functions and literally get first 4 characters out of the string. PHP Code: -- $a ...
1,473 Views
4 Replies
01-09-2019, 01:13 AM
Pertti
    Thread: Query in CI Tutorial
Post: RE: Query in CI Tutorial

For 3 different values, I assume you mean 'templates/header', 'pages/'.$page and 'templates/footer'? This is because first attribute points to template file, so these three lines pass the same data...
1,938 Views
4 Replies
01-07-2019, 03:40 AM
Pertti
    Thread: Run Cron Job
Post: RE: Run Cron Job

You're using $settings['listing_expiry_days'] in there which makes it a bit confusing, if I understand it correctly the 7 days should count from current time? However you should be able to use mkti...
2,487 Views
3 Replies
01-07-2019, 12:56 AM
Pertti
    Thread: Interview Question -
Post: RE: Interview Question -

A bit background, because PHP works slightly different from lets say Java or NodeJS, app itself does not crash. If one request fails, and another request is made to the server, PHP script is executed ...
1,302 Views
2 Replies
01-07-2019, 12:47 AM
Pertti
    Thread: library and helper without codeigniter
Post: RE: library and helper without codeigniter

On CodeIgniter 3, most of the helpers seem to be using some parts of core to get config and then calculate the value. Same seems to be the case for libraries. So by the looks of it, no. You could p...
1,645 Views
2 Replies
01-04-2019, 08:07 AM
Pertti
    Thread: Best option to read files
Post: RE: Best option to read files

Cool. I usually use scandir for all my file-list operations - http://php.net/manual/en/function.scandir.php
2,189 Views
3 Replies
01-03-2019, 02:53 AM
Pertti
    Thread: PHPbenchmarks.com
Post: RE: PHPbenchmarks.com

ciadmin Wrote: (12-24-2018, 11:24 AM) -- I am almost done incorporating the requested benchmark features, above & beyond "hello world" and 'basic rest", so no help needed, thanks. I should be done th...
17,283 Views
23 Replies
01-03-2019, 02:52 AM
Pertti
    Thread: how to input multiple values and data at the same time ?
Post: RE: how to input multiple values and data at the s...

PHP Code: -- $id_surat = $this->db->query('SELECT surat.id_surat FROM surat ORDER BY id_surat DESC limit 1'); $id_user = $this->input->post(array('id_user')); -- I think you expect both these ...
1,394 Views
1 Replies
01-02-2019, 02:26 AM
Pertti
    Thread: Best option to read files
Post: RE: Best option to read files

Depends, what exactly are you trying to do? If you are using CI4, in documentation it says you can tell it to leave out the path, setting second attribute to false (which should be false by default...
2,189 Views
3 Replies
01-02-2019, 02:19 AM
Pertti
    Thread: include view in parser
Post: RE: include view in parser

I have to admit I have not personally played with v4 yet, but I think this might be what you are after: https://codeigniter4.github.io/CodeIgniter4/general/common_functions.html?highlight=view#view ...
8,294 Views
8 Replies
01-02-2019, 02:00 AM
Pertti
    Thread: PHPbenchmarks.com
Post: RE: PHPbenchmarks.com

ciadmin Wrote: (12-22-2018, 09:11 AM) -- Interesting exercise, trying to look at CodeIgniter from the perspective of other frameworks :-/ One thing that has popped out of my activities is a compos...
17,283 Views
23 Replies
12-24-2018, 04:22 AM
Pertti
    Thread: Rewrite public from url
Post: RE: Rewrite public from url

daveĀ friend Wrote: (12-20-2018, 10:15 AM) -- Small point-of-interest on the use of the .dev TLD. You can use it for local development, but it must be a secure connection. In other words, it must use ...
5,097 Views
7 Replies
12-24-2018, 04:15 AM
Pertti
    Thread: How to Become Expert
Post: RE: How to Become Expert

I've not read this series completely myself yet, but check out https://dev.to/mattsparks or https://developmentmatt.com/category/building-a-framework/ Seems to be quite in depth.
10,065 Views
10 Replies
12-24-2018, 02:19 AM
Pertti
    Thread: CI Session - Lost connection to MySQL server during query
Post: RE: CI Session - Lost connection to MySQL server d...

Some time ago we noticed issues with sessions as well when using database storage. This has been discussed few times on this forum why it has to work the way it does, but we ended up changing to file ...
6,971 Views
8 Replies
12-20-2018, 02:01 AM
Pertti
    Thread: Rewrite public from url
Post: RE: Rewrite public from url

As Ciadmin said, this is two part problem - removing 'ci4/public' from URL and removing 'index.php' from URL. Using localhost had some limitations anyway that I can't remember right now, but you ca...
5,097 Views
7 Replies
12-20-2018, 01:53 AM
Pertti
    Thread: Password reset not working, form submission not working; Email not working
Post: RE: Password reset not working, form submission no...

Hey, When sending email, check the debug, it usually tells you why it couldn't send email: PHP Code: -- $this->email->send(false); // false attribute is important, otherwise debug data will b...
1,262 Views
2 Replies
12-20-2018, 01:25 AM
Pertti

Theme © iAndrew 2016 - Forum software by © MyBB