codeigniter

paypal digital goods integration how to enable pay as guest?

核能气质少年 提交于 2019-12-31 06:49:41
问题 Hi i'm using paypal integration wizard to do digital goods checkout (PHP). https://www.paypal-labs.com/integrationwizard/ It should support both paypal payment and non-paypal payment(buy as a guest->credit card). in the wizard, it set payment option directly to paypal : $PaymentOption = "PayPal"; is there any way to enable paypal direct checkout as a guest? or do i need to add credit card api myself? Thanks 回答1: It depends on the receiving account. In order to have Guest Checkout, the

Codeigniter, setting up pagination

拈花ヽ惹草 提交于 2019-12-31 06:17:30
问题 So, i'm having a problem to setting up pagination on my site. First of all, if i'm at the first page of my site, and pressing to go to page 2, the "1" still stays bold. Though i can see in the url that i am at page 2. Secondly, i need some help to retrieve the data correctly. If i am at page 1, i want to get all records 1-10. If i am on page 2, i want to get all records from 11-20. Got it? I have google'd and tried to find any solution, without any success. $this->db->select('*'); $this->db-

How to retrieve imploded images path in database to view in code igniter

徘徊边缘 提交于 2019-12-31 06:07:06
问题 I am trying to save the multiple images path in database and upload images in root's upload/images[directory]. I have done it and its working. Images name are saved in database and and the image files are being uploaded. I just did save the images name by imploding. Now I need to explode that image in view. How can i do that? I have tried the following code in view and its not working. <?php foreach ($products as $p): ?> <tr> <td><?php echo $p['id']; ?></td> <td><?php echo $p['product_name'];

How to access a variable in a PHP class that is set by another function? Codeigniter

ⅰ亾dé卋堺 提交于 2019-12-31 05:42:27
问题 I have this code here in PHP using Codeigniter framework, I can't seem to get my head around class variables in this code seems completely different to C++. I was wondering how I can get a local variable in one class (function) method to another class method. But not passing them as variables as I have to use a redirect function instead which cannot take variables. The variable I want to have accessible is $record_id , i tried making it public etc does not like it. class Submit extends CI

Getting error while placing pagination on search in codeigniter

痴心易碎 提交于 2019-12-31 05:39:06
问题 I am getting an error while placing pagination on search in Codeigniter. I tried the following code. on moving to next page it showing an error page. $search = $this->input->get('query'); $data['snippets'] = $this->Constant_model->search($search); $config = array(); $config["base_url"] = base_url() . "search?query=".$search; $config["total_rows"] = $this->Constant_model->search_query_result_count($search); $config["per_page"] = 12; $config["uri_segment"] = 2; $config['full_tag_open'] = '<ul

Displaying data of two tables on the same web page

五迷三道 提交于 2019-12-31 05:37:12
问题 I am new to codeigniter. Currently I am working on a small project as practice and I am trying to display data of two tables on the same web page. I tried to use $this->db->join(); in codeigniter but it does not work for me. I was wondering is there other options that I can explore of displaying two table data on a same web page? I am also posting my join method that I have tried - maybe you can tell me I did something wrong? model $this->db->select('tblanswers.*,credentials.*'); $this->db-

Use of undefined constant CURLOPT_IPRESOLVE - assumed 'CURLOPT_IPRESOLVE'

半世苍凉 提交于 2019-12-31 05:35:12
问题 i have http://www.idiotminds.com/login-with-facebook-in-codeigniter/ but i have error > A PHP Error was encountered > > Severity: Notice > > Message: Use of undefined constant CURLOPT_IPRESOLVE - assumed > 'CURLOPT_IPRESOLVE' > > Filename: facebook/base_facebook.php and i fix CURLOPT_SSL_VERIFYPEER => false, but not fixed but i have enable the php_curl ** cURL support enabled cURL Information libcurl/7.24.0 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5 ** code public static $CURL_OPTS = array(

Serving Images to get a request

倖福魔咒の 提交于 2019-12-31 05:32:45
问题 I am using CodeIgniter rest Controller. I want to be able to serve images on GET requests made by the client. Is this the best option or should i just provide a link to the image and let the client download it themselves? If I can serve the images itself, than how should I? 回答1: To make CodeIgniter set the proper headers and such you could do this in your controller: $this->output->set_content_type('jpeg')->set_output(file_get_contents('path_to_file')); And it will output (as request response

Codeigniter session will not unset

◇◆丶佛笑我妖孽 提交于 2019-12-31 05:22:36
问题 im working on a community, and i want to user to log off but it dosent unset the userdata :S, do you know why? this is my controller function function logOff() { //$this->session->flashdata('reports', 'Du er logget af'); //redirect('frontpage', 'refresh'); $this->session->unset_userdata($sessionData); } 回答1: You can destroy an entire session by calling the following: $this->session->sess_destroy(); 回答2: You need to specify what elements you want to unset individually rather than a variable or

500 Internal Server Error

大兔子大兔子 提交于 2019-12-31 04:54:06
问题 Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, admin@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Why is it telling me this? .htaccess: RewriteEngine On RewriteBase /ci_series/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond