Welcome Guest, Not a member yet? Register   Sign In
Search Results
    Thread: updated to current ci but base_url() defect
Post: RE: updated to current ci but base_url() defect

I've taken a look at that. I intend to study it further.
3,647 Views
6 Replies
04-14-2017, 09:34 PM
cupboy
    Thread: updated to current ci but base_url() defect
Post: RE: updated to current ci but base_url() defect

I was able to fix it by going into system/core/Config.php and changing __construct to do it the old way, using  $__SERVER['HTTP_HOST'] instead of the new, non-working way which used $__SERVER['SERVER_...
3,647 Views
6 Replies
04-14-2017, 08:39 PM
cupboy
    Thread: updated to current ci but base_url() defect
Post: RE: updated to current ci but base_url() defect

It's blank in both config files (older version, and current version). Definitely a bug with the new codeignitor version. I don't know what older version I'm currently running but it's a version 3 vers...
3,647 Views
6 Replies
04-14-2017, 12:02 PM
cupboy
    Thread: regex pattern needs improvement
Post: regex pattern needs improvement

I would like to use one pattern that handles having a date in the subject and not having a date in the subject. Can't get it to work both ways. Also the 9 digit number appears twice, which is quite a ...
999 Views
0 Replies
06-12-2016, 04:23 PM
cupboy
    Thread: regex help needed
Post: RE: regex help needed

I figured out how to get the results. It's a two step process though. Probably is a better way. For the time being the 2nd process is a little bit like this: Code: --  $pattern = '/([MF].|INF|CAP...
2,935 Views
4 Replies
05-09-2016, 11:09 PM
cupboy
    Thread: regex help needed
Post: regex help needed

I've been trying to figure this out for awhile, so it must be time to ask for help. How can I get the results I want? Code: -- $subject = '\n   MC - 5-10 OVER IN A CHURCH ZONE    - 12/08/15\n    I...
2,935 Views
4 Replies
05-09-2016, 09:54 AM
cupboy
    Thread: mysqli num rows blows up the script
Post: mysqli num rows blows up the script

What is wrong with the below code. It fails on the num_rows, but gives no error message.. it just doesn't go beyond that point. This isn't actually codeignitor code, it's just straight PHP. Code: --...
1,493 Views
1 Replies
05-03-2016, 11:40 PM
cupboy
    Thread: mysql_real_escape_string() expects parameter 1 to be string, array given
Post: RE: mysql_real_escape_string() expects parameter 1...

1. The goal is to put the results into a javascript array that requires the same type of escaping as an SQL statement 3. Fixed that to be mysqli instead. I've fixed all this and the code is fine n...
8,843 Views
7 Replies
04-24-2016, 04:11 PM
cupboy
    Thread: ajax won't let me obtain affected_rows
Post: RE: ajax won't let me obtain affected_rows

raghavgarg Wrote: (04-24-2016, 01:18 AM) -- If you are choosing OOP style for mysqli query then you have to use mysqli object to use any method/property of mysqli. TRY: $rowsAffected = $mysqli->a...
3,204 Views
3 Replies
04-24-2016, 10:01 AM
cupboy
    Thread: ajax won't let me obtain affected_rows
Post: ajax won't let me obtain affected_rows

This code is in a file being run as ajax. Trying to obtain the count of affected rows causes a failure. I get no error message, and the try .. catch doesn't catch it either. What could be going on? I'...
3,204 Views
3 Replies
04-23-2016, 11:17 PM
cupboy
    Thread: mysql_real_escape_string() expects parameter 1 to be string, array given
Post: RE: mysql_real_escape_string() expects parameter 1...

I ended up using a str_replace to get those quotes escaped before making a javascript array out of the data. Wasn't really using it to insert data going into a table... that's where the data is coming...
8,843 Views
7 Replies
04-23-2016, 02:04 PM
cupboy
    Thread: mysql_real_escape_string() expects parameter 1 to be string, array given
Post: mysql_real_escape_string() expects parameter 1 to ...

Code: --  foreach($q->result_array() as $row) {                $descs[] = mysql_real_escape_string($row);   //  Message: mysql_real_escape_string() expects parameter 1 to be string, array given --...
8,843 Views
7 Replies
04-22-2016, 10:27 PM
cupboy
    Thread: force_download does not work in controller
Post: force_download does not work in controller

I can get this to work in a view but not in a controller. Why would that be? For some odd reason someone posted something on another site (daniweb) where a poster claims to use it in a controller. Su...
1,697 Views
1 Replies
03-30-2016, 03:13 PM
cupboy
    Thread: problem with require_once inside a view
Post: RE: problem with require_once inside a view

skunkbad Wrote: (02-24-2016, 12:04 AM) -- require and require_once are generally for paths, not URLs. Your use of $baseurl would seem to indicate that you are trying to load a URL. Instead, try to us...
5,099 Views
3 Replies
02-24-2016, 10:45 AM
cupboy
    Thread: problem with require_once inside a view
Post: problem with require_once inside a view

I have a require_once 'inc/functions.php'; in a view and it works fine. I would like to move functions.php to the same folder that the css files are in. This css files are accessed like this: href=$...
5,099 Views
3 Replies
02-23-2016, 10:08 PM
cupboy
    Thread: Cannot use isset to check for segment.. Why not?
Post: Cannot use isset to check for segment.. Why not?

Cannot do this: if (isset($this->uri->segment(1))) //   Can't use method return value in write context in.... But this is OK: if ($this->uri->segment(1)) Anyone know the reason? I don't know w...
3,088 Views
2 Replies
02-17-2016, 05:53 PM
cupboy
    Thread: Does CodeIgniter convert all post variables to get variables?
Post: RE: Does CodeIgniter convert all post variables to...

so this fixes it then: based on my limited testing... thanks for the clue Paul
4,998 Views
7 Replies
02-10-2016, 01:05 PM
cupboy
    Thread: Does CodeIgniter convert all post variables to get variables?
Post: RE: Does CodeIgniter convert all post variables to...

PaulD Wrote: (02-10-2016, 12:55 PM) -- Hi, Can you post your html for the frmMain, I am guessing you are using method="get" if you are still getting values in the get array. Paul. --
4,998 Views
7 Replies
02-10-2016, 01:00 PM
cupboy
    Thread: Does CodeIgniter convert all post variables to get variables?
Post: RE: Does CodeIgniter convert all post variables to...

siburny Wrote: (02-09-2016, 05:08 PM) -- I don't think CI would move POST vars to GET. Maybe snippet of code you are using would help troubleshoot it. -- Here is some of the code: javascript cod...
4,998 Views
7 Replies
02-10-2016, 12:42 PM
cupboy
    Thread: Does CodeIgniter convert all post variables to get variables?
Post: Does CodeIgniter convert all post variables to get...

I created two post variables and can only find them in the get array. This doesn't make any sense to me. Does CodeIgnitor do this on it's own?
4,998 Views
7 Replies
02-09-2016, 05:02 PM
cupboy

Theme © iAndrew 2016 - Forum software by © MyBB