Cant post code!!!!??? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Cant post code!!!!??? (/showthread.php?tid=60167) |
Cant post code!!!!??? - El Forum - 01-28-2014 [eluser]behnampmdg3[/eluser] Edit: Please see post below Cant post code!!!!??? - El Forum - 01-28-2014 [eluser]behnampmdg3[/eluser] Trying to conver this code to a class: Code: include 'sms.php'; Code: if ( ! defined('BASEPATH')) exit('No direct script access allowed'); Thanks Cant post code!!!!??? - El Forum - 01-29-2014 [eluser]Tpojka[/eluser] Have you double checked gateway documentation? Can you edit your post to be readable to anyone? Cant post code!!!!??? - El Forum - 01-29-2014 [eluser]behnampmdg3[/eluser] [quote author="Tpojka" date="1390992228"]Have you double checked gateway documentation? Can you edit your post to be readable to anyone?[/quote]Edit worked! ;p Cant post code!!!!??? - El Forum - 01-29-2014 [eluser]CroNiX[/eluser] I believe Code: $api = $this->load->library('Mysms', $params); Code: $this->load->library('Mysms', $params); and then you access it like Code: $this->mysms->foo(); This doesn't seem to be correct: Code: $result=$api->sendSms( Also you should probably post your mysms library if that doesn't work, particularly the constructor since you pass data to it. Cant post code!!!!??? - El Forum - 01-29-2014 [eluser]behnampmdg3[/eluser] Hi now I get this: Quote:Error: The auth data you have provided is invalid.I think passing $param is not working! Code: $params = array('aaa', 'aaaa'); Cant post code!!!!??? - El Forum - 01-29-2014 [eluser]behnampmdg3[/eluser] Class seems to be too big. I need to attach it somehow? Cant post code!!!!??? - El Forum - 01-29-2014 [eluser]CroNiX[/eluser] That means you should be looking at your mysms library, which you didn't post. Edit: ah, you did when I was posting this. So look at your mysms library constructor which expects 2 parameters, and then look at the single array you are passing it when you instantiate it. Notice something wrong there? Cant post code!!!!??? - El Forum - 01-29-2014 [eluser]behnampmdg3[/eluser] [quote author="CroNiX" date="1391040571"]That means you should be looking at your mysms library, which you didn't post.[/quote]I tried It breaks. Man something is wrong here I guess. It doesnt like the code! Cant post code!!!!??? - El Forum - 01-29-2014 [eluser]behnampmdg3[/eluser] Cant attach either. Gives me blank page. |