Welcome Guest, Not a member yet? Register   Sign In
Search Results
    Thread: Cannot connect remote database
Post: RE: Cannot connect remote database

When you say, Quote: -- I check connect with terminal, it's good. -- is that from a terminal on the web server?
14,632 Views
3 Replies
10-11-2023, 12:03 PM
sheilaf
    Thread: Unable to connect to database.
Post: RE: Unable to connect to database.

You Posted this: PHP Code: -- use CodeIniter\Database\ConnectionInterface; -- It has a typo and should be: PHP Code: -- use CodeIgniter\Database\ConnectionInterface; -- Typo in your po...
332 Views
2 Replies
10-08-2023, 08:55 PM
sheilaf
    Thread: Error 'Can't find a route for GET' on Ajax POST
Post: RE: Error 'Can't find a route for GET' on Ajax POS...

I think you want the JavaScript to look like this: PHP Code: --     $.ajax({       url: siteurl + "produk/" + method + "Produk",       method: "POST", -- 'method' not 'type'. I'm not sure if...
875 Views
6 Replies
09-22-2023, 06:18 PM
sheilaf
    Thread: Add a .js file and routes
Post: RE: Add a .js file and routes

I handled it this way in my view file: Code: --   -- Views/js/form_js.php is really Javascript but starts with php tags enclosing a comment Code: -- -- The rest is just straig...
1,851 Views
14 Replies
08-11-2023, 10:19 AM
sheilaf
    Thread: Security and File Upload in CodeIgniter: Best Practices to Keep Images Out of the Pub
Post: RE: Security and File Upload in CodeIgniter: Best ...

You need create a method to read the image file and send it's contents to the browser with the correct header. See this for some hints on how to do with straight PHP: https://stackoverflow.com/ques...
1,309 Views
5 Replies
08-02-2023, 08:10 AM
sheilaf
    Thread: Form POST submit with parentheses issue
Post: RE: Form POST submit with parentheses issue

stevukas Wrote: (07-29-2023, 07:50 AM) -- Hello, The weird issue only happening in Production Env, but in my local server, it works find My Prod server hosted in CPANEL, so it could be server issue...
476 Views
2 Replies
08-01-2023, 10:43 AM
sheilaf
    Thread: Template data title from db
Post: RE: Template data title from db

BaseController makes sense to me. Add a protected var and assign it a value in initController(). Then you can change the value in any other controller as needed.
865 Views
2 Replies
06-06-2023, 08:31 AM
sheilaf
    Thread: Strange problem - CodeIgniter Error - won't start
Post: RE: Strange problem - CodeIgniter Error - won't st...

CJRhoads Wrote: (05-31-2023, 10:31 AM) -- Hello. I'm not a professional programmer, but I'm trying to help my student intern so that he can help me this summer.  We are running into a very strange pr...
2,069 Views
5 Replies
06-05-2023, 01:40 PM
sheilaf
    Thread: When model returns an array of stdClass - how to iterate
Post: RE: When model returns an array of stdClass - how ...

PHP Code: -- foreach ($data as $d) {     // $d is object of stdClass     // use arrow-notation to get to the stored values by their column names     // $d->somecolumnname } -- HTH
949 Views
4 Replies
06-02-2023, 11:24 AM
sheilaf
    Thread: chmod(): Operation not permitted
Post: RE: chmod(): Operation not permitted

captain-sensible Wrote: (05-22-2023, 12:00 PM) -- (a pinch of salt/ toungue in cheek )i wonder if as Baldrick from black adder might once have said - oh its a cunning plan from the makers of  windows...
1,900 Views
7 Replies
05-22-2023, 02:11 PM
sheilaf
    Thread: chmod(): Operation not permitted
Post: RE: chmod(): Operation not permitted

"wsl2" is Windows Subsytem for Linux? I tried working with that last year and gave up. As I recall my problems were related to file permissions.
1,900 Views
7 Replies
05-22-2023, 11:41 AM
sheilaf
    Thread: Getting 403 on AJAX POST to controller
Post: RE: Getting 403 on AJAX POST to controller

When I encountered this problem, I took the easy way out and just turned off CSRF for the routes. This done by editing the $globals array in Config/Filters.php. PHP Code: -- public $globals = [   ...
3,593 Views
15 Replies
05-03-2023, 11:06 AM
sheilaf
    Thread: Replace image if it already exists while uploading
Post: RE: Replace image if it already exists while uploa...

I had something similar and finally decided all I really needed was to know the name of the new file so it could be stored in the database. At some point I'll create a script to remove images not list...
3,059 Views
6 Replies
01-23-2023, 03:24 PM
sheilaf
    Thread: global variable
Post: RE: global variable

Have a look at the Session library https://codeigniter.com/user_guide/libraries/sessions.html
893 Views
3 Replies
01-20-2023, 12:35 PM
sheilaf
    Thread: Very slow if $data is big
Post: RE: Very slow if $data is big

How much data are you sending to the view?  Tell us more about your application. If you're reloading the whole page after a small change, then Ajax might indeed be the way to go. Hard to say without ...
5,873 Views
15 Replies
01-20-2023, 12:19 PM
sheilaf
    Thread: codeigniter data insert
Post: RE: codeigniter data insert

There's nothing built into CodeIgniter to do this. It would need to part of the code you purchased. I suggest using git or some other version control to help with updates. Start with a working versi...
559 Views
1 Replies
12-04-2022, 02:07 PM
sheilaf
    Thread: Severity: Notice Message: Undefined variable
Post: RE: Severity: Notice Message: Undefined variable

Are you calling the view from your model? How is the function ppdb() in your model called?
1,363 Views
2 Replies
11-06-2022, 08:53 PM
sheilaf
    Thread: Codeigniter controller showing error
Post: RE: Codeigniter controller showing error

This function is in your Invoice class right? Does it have a property (variable) called $email? class Invoice { public $email = \Config\Services:email(); public function sendReminderForUnpa...
1,115 Views
1 Replies
11-06-2022, 08:48 PM
sheilaf
    Thread: Multi Query Problems in Codeigniter 3
Post: RE: Multi Query Problems in Codeigniter 3

Does the stored procedure work as expected from outside CodeIgniter? I ask because the two lines of SQL you posted is not how you get OUTPUT from a MySQL stored procedure. I don't know how other db...
7,507 Views
10 Replies
07-18-2021, 08:22 PM
sheilaf

Theme © iAndrew 2016 - Forum software by © MyBB