Recipe for creating Dynamic sitemap with CodeIgniter. Like yoursite.com/sitemap.xml Example. Suppose you have an articles blog where url for each article is by article ID Like yoursite.com/123 . All articles are stored in articleTable of the database. First Create a model to get URLs. Create a file named url_model.php in application/models directory. Get Urls from database <?php class Url_model extends CI_Model{ public function __construct(){…
Category
CodeIgniter
How to : Replace underscore “_” with hyphen “-” in CodeIgniter
Hello there, Since last couple of days I am aware of on-site SEO. There I found that underscore in URL is not recommended rather hyphen is good for SEO. But in PHP class method hyphen is not allowed rather underscore is recommended. So when you make a method in controller class over CI its difficult…
Debug : xDebug with CodeIgniter over LAMP
Hello friends, How is going on? Hope everyone is fine. This days I am fascinated with PHP, but still I missed my VB6 and .NET experience as those have a built in debug system. And you know debugging is one of the best way to confirm about what is happening by your code. So I…