Cant post code!!!!??? |
[eluser]behnampmdg3[/eluser]
Ok; Good point. As you say, the constructor expects 2 params: Code: public function __construct($key, $secret) I changed to this below, but now I get blank page. $param1 = 'skdjalsd'; $param2 = '87989'; $this->load->library('Mysms', $param1, $param2);
[eluser]behnampmdg3[/eluser]
oh wait!!!! It says: Quote:A PHP Error was encountered But I AM passing them: Code: $param1 = ‘skdjalsd’;
[eluser]Tpojka[/eluser]
Usually, blank page is sign you are doing ok, but without output method. Meaning: if there is no error message, it could be good. I am asking you that duplicate your code here right in [ code][ /code]/*with no spaces after breckets*/ or edit your post above. Also, try to hard code your library inserting your credentials into constructor parameters. Edit, don't change your posts so often.
[eluser]behnampmdg3[/eluser]
[quote author="Tpojka" date="1391042151"]Usually, blank page is sign you are doing ok, but without output method. Meaning: if there is no error message, it could be good. I am asking you that duplicate your code here right in [ code][ /code]/*with no spaces after breckets*/ or edit your post above. Also, try to hard code your library inserting your credentials into constructor parameters.[/quote]See 1 post above your post. ;p
[eluser]CroNiX[/eluser]
With CI, I think you can only pass an array to the constructor, so you just need to adjust the constructor. Something like: Code: public function __construct($config) Then instantiate like: Code: $config = array( See the docs for the Loader class on the parameters you can pass to load::library();
[eluser]behnampmdg3[/eluser]
PHP Syntax error Parse error: parse error in /Users/pmdg3/Documents/test.com/application/libraries/Mysms.php on line 17 Code: public function __construct($args)
[eluser]CroNiX[/eluser]
Yeah, you have some curly quotes instead of single quotes in there. Sometimes the forum converts them. Don't blindly copy/paste without proof reading.
[eluser]behnampmdg3[/eluser]
CroNix; Thank you so much. All working. We need to fix the CI forum. I had such a hard time you know? Maybe you can help them. Thanks again |
Welcome Guest, Not a member yet? Register Sign In |