![]() |
How to use own php scripts in CI4 - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: How to use own php scripts in CI4 (/showthread.php?tid=83480) |
How to use own php scripts in CI4 - moana12 - 09-29-2022 Hello all, My name is Ruud from The Netherlands and I'm new to CI. After reading the book from Lonnie Ezell, that for me was a good starting point, I'm a bit further now and can manage some things. But... all my projects in de past where build from scratch and, for me, the way to make some things as I need, and what I want works at this moment. I want to go with the time, and trying to make my projects again, but in CI4 now, because I really like the MVC approach. For now, I want to read a large CSV file from an URL into the database, and after that I want to do some complex handling (trow out records I don't need etc) before I want to use it in a Model / Controller. In my opinion there is no task in the controller to delete fixed postal codes ranges, remover other unnecessary information from records etc before the tabel is really going to use. It is a kind of strip out the incoming data from the URL every week or so, before my application will use it for the purpose of the user. But I can't find how to do the following: - Can I point from a controller (or whatever it is good to do) to one of my earlier created php files that already working well, and if so, is that the right to do it in CI4? - Or do I have to make a library or something like that to do it the CI4 way? There are al lot of items to find on the internet, but most of them go very deep and sometimes the makers find out some hack likes solutions. Want I want is to get as close as possible in the CI4 way to work out my needs. Is there somebody who can give me a good direction to go further? Thank in advance and I'm looking forward to the reply on this question. [/url][url=https://rathbunlakeassoc.com/football-betting-website/][size=1]ลิงค์ทางข้าแทงบอลออนไลน์[/size] RE: How to use own php scripts in CI4 - InsiteFX - 09-30-2022 From what you explained I would take and move the code into a library and then call it from CodeIgniter. RE: How to use own php scripts in CI4 - kenjis - 09-30-2022 This is sample code and lacks error handling, etc. for use in a production environment, but may be helpful for you. https://github.com/kenjis/ci4-qb-batch-sample |