Skip to content

Tag: php

Why does PHPMailer fail to connect to my SMTP server

PHPMailer version: 6.5.0 When I am trying to connect my PHPMailer script with my SMTP server I am getting this error: The first “SSL loaded” is my script checking if it has OpenSSL enabled. My mail server is: Note: “mail.solninjaa.com” is the IMAP and POP3 address as well. I ran a comm…

I can’t get my additive weighting algorithm to work properly

I have a data structure that look like this I’m trying to get the normalized values but it wasn’t giving me the expected result with my current algorithm. I have been stuck with this problem for about 4 days, the problem is in the min(…) and max(…) function inside the get_matrix_r meth…

laravel – passing data from first page to third page

I have a booking system where I divided into three steps. First, user can input the parcel weight, postcode,etc and then generate a quotation for couriers rate which brings to the next step. Second, it shows an a list of rates for the couriers to choose and user have to select one courier and proceed to the n…

Load View in Custom Helper Codeigniter 4

In CI 3 i can load view file in helper like this. But in CI 4, when i use this function in my custom helper, it shows following error. Call to undefined function get_instance() How can i load view file in helper in CI 4 ? Answer There’s no need for any of that. In codeigniter 4 all you need

Warning: Array to string conversion base64_encode

When I do this $payload2 = base64_encode($payload); I will get message “Expected type : string” so I change to $payload2 = base64_encode((string)$payload); but I will get the “Warning: Array to string conversion” error. How to solve this error? Solution of using json_encode: Answer Sol…