Welcome Guest, Not a member yet? Register   Sign In
Search Results
    Thread: How to manually load composer libraries?
Post: RE: How to manually load composer libraries?

Narf Wrote: (01-30-2017, 02:36 PM) -- It's autoloading in the sense that you don't need to do include()s manually, not that everything is loaded at once. Don't worry about it. -- OK, I got it....
3,506 Views
3 Replies
01-31-2017, 06:09 PM
dangyuluo
    Thread: How to manually load composer libraries?
Post: How to manually load composer libraries?

I installed some packages composer into /application/vendors. But seems all of the installed packages are loaded automatically, even if I just want to use one of them. Is there any way to manually l...
3,506 Views
3 Replies
01-30-2017, 10:49 AM
dangyuluo
    Thread: Name requirement of Controller and Model is different when extending core lib
Post: Name requirement of Controller and Model is differ...

I'm trying to extend the original CI_Controller and CI_Model to meet some of my demands. But when I do this, I found that the name requirement of extending these two core libraries is different from e...
1,855 Views
1 Replies
09-16-2016, 07:28 PM
dangyuluo
    Thread: How to use redis instead of file system as a mysql cache
Post: How to use redis instead of file system as a mysql...

Seems that Codeigniter use Redis separately as a key-value cache. But in many situations we need more that that. I know that Codeigniter offers database cache, which is based on file storage. Yet com...
2,575 Views
0 Replies
06-13-2016, 06:26 AM
dangyuluo
    Thread: Is it possible to enable CSRF protection for RESTful method like PUT and DELETE
Post: RE: Is it possible to enable CSRF protection for R...

The CSRF config part is as follows: Code: -- $config['csrf_protection'] = TRUE; $config['csrf_token_name'] = 'csrf_name'; $config['csrf_cookie_name'] = 'csrf_cookie_name'; $config['csrf_expire'] ...
3,732 Views
2 Replies
05-18-2016, 07:17 AM
dangyuluo
    Thread: Is it possible to enable CSRF protection for RESTful method like PUT and DELETE
Post: Is it possible to enable CSRF protection for RESTf...

I'm building a RESTful API and use several HTTP verbs like PUT, DELETE and of course POST to accept web client request and doing corresponding process. The post request can be protected by enabling C...
3,732 Views
2 Replies
05-18-2016, 06:24 AM
dangyuluo
  Exclamation Thread: Warning on using PHP7 and Redis as Session Driver
Post: Warning on using PHP7 and Redis as Session Driver

Recently I uploaded my PHP version to PHP7. It was a hard job to upload all packages like Redis, PDO and memcached. After successfully deploying, sometimes the app reports a fatal PHP error like the...
3,060 Views
1 Replies
04-18-2016, 10:59 AM
dangyuluo
    Thread: A SLASH problem of relative href value
Post: RE: A SLASH problem of relative href value

InsiteFX Wrote: (02-01-2016, 04:48 AM) -- You can add this to your .htaccess file to remove the ending slash from your url's. RewriteRule ^(.*)/$ $1 [R=301,L] -- That's also an elegant solution....
2,895 Views
2 Replies
02-01-2016, 07:48 AM
dangyuluo
    Thread: A SLASH problem of relative href value
Post: A SLASH problem of relative href value

When using a relative A link, there seems to be a little problem. Assume there is a page whose url is http://www.site.com/user/index. And normally we can also visit it through http://www.site.com/use...
2,895 Views
2 Replies
01-31-2016, 07:43 PM
dangyuluo
    Thread: What does $this refer to in a Model?
Post: RE: What does $this refer to in a Model?

Narf Wrote: (01-29-2016, 03:41 AM) -- dangyuluo Wrote: (01-29-2016, 03:06 AM) -- Narf Wrote: (01-29-2016, 02:06 AM) -- By actually reading my second sentence and those links? :) -- I'm not trying ...
12,309 Views
10 Replies
01-30-2016, 05:26 AM
dangyuluo
    Thread: What does $this refer to in a Model?
Post: RE: What does $this refer to in a Model?

Narf Wrote: (01-29-2016, 02:06 AM) -- By actually reading my second sentence and those links? :) -- I'm not trying to offend you, but maybe you misunderstand my question. I can surely use _get to...
12,309 Views
10 Replies
01-29-2016, 03:06 AM
dangyuluo
    Thread: What does $this refer to in a Model?
Post: RE: What does $this refer to in a Model?

Narf Wrote: (01-28-2016, 10:31 AM) -- No, $this always refers to the instance of the class you are currently in. You can access controller properties because of a magic __get() (https://secure.php...
12,309 Views
10 Replies
01-28-2016, 07:09 PM
dangyuluo
    Thread: What does $this refer to in a Model?
Post: What does $this refer to in a Model?

When initialising a model(such as a class called Mall), I can pass a TRUE in the third parameter to automatically connect to the default database. Then a member named mall is assigned to CI_Controller...
12,309 Views
10 Replies
01-28-2016, 09:26 AM
dangyuluo
    Thread: Questions about transferring data to parse
Post: Questions about transferring data to parse

Now I'm using parse to generate pages, and I attach an array with it, like the following: Code: -- private $data = array( 'title'       => 'this is a title', 'keywords'    => 'this is keyword...
2,963 Views
1 Replies
09-17-2015, 06:33 AM
dangyuluo
    Thread: How to use integrated Cache class in router.php?
Post: How to use integrated Cache class in router.php?

In one of my project I need to create a Dynamic Routing. It means that I need to change the routing regular regarding the different domain. And I store the routing regular of each domain in Memcache,...
2,262 Views
1 Replies
08-29-2015, 06:16 PM
dangyuluo
    Thread: How can I use memcache to cache something in Helper function
Post: RE: How can I use memcache to cache something in H...

mwhitney Wrote: (08-28-2015, 07:55 AM) -- Use the Cache library (http://www.codeigniter.com/user_guide/libraries/caching.html) with the Memcached driver. Since you said you were building a helper,...
3,271 Views
2 Replies
08-28-2015, 06:42 PM
dangyuluo
    Thread: How can I use memcache to cache something in Helper function
Post: How can I use memcache to cache something in Helpe...

Now I'm going to create a customized Helper, and in now of its function I want to use memcache to cache something. So what should I do to use cache like in controller?
3,271 Views
2 Replies
08-28-2015, 06:51 AM
dangyuluo

Theme © iAndrew 2016 - Forum software by © MyBB