• t
  • g
  • B
  • Z
  • @
  • e

portfolio & blog of senior web developer, Fahd Murtaza



  • About
  • Portfolio
  • WordPress
  • CV
  • Blog
  • Contact

  • About
  • Portfolio
  • WordPress
  • CV
  • Blog
  • Contact

CodeIgniter: How to set your images path automatically for your site

February 13th, 2008 by Fahd

Well I was thinking that the old source code I got from the other guy Nouman who was working on this Home Work Center Project that was and is being coded in CodeIgniter was not very much upto date. I fixed the Javascript issues; in fact a lot of them including the JavaScript date picker calendar. It fits well, works on IE 6, IE7, Safari and Firefox; haven’t yet checked with others. But I am sure it will!. Anyhow the problem I was facing was that in different folders in Views for CodeIgniter , if we are using images, we have to use relative URLs in most of the pages, which gets quite troublesome sometimes. As long as it is the CodeIgniter I am working on, I don’t want to use my own includes having setting of the site because this is why we are using CodeIgniter .

Solution:

So cutting short the details, if you want to use the site’s URL and relative paths according to your site’s base url, here is the solution use site_url(). The link contains all the details you will need to use for your views and it also tells which helpers you need to load.

Posted in CodeIgniter, PHP

Logging In...

Profile cancel

Sign in with Twitter Sign in with Facebook
or

Not published

  • Get Posts tagged with

    2008 About Fahd Murtaza Art and Artists Articles beautiful Blogging Blogging Engines cat Databases Entertainment fahd Fahd Murtaza Famous Quotes Flickr flower Flowers funny General google islamabad light lovely macro mansehra markaz murtaza News Open Source Pakistan Pakistani Photographers People Photography PHP PHP Tips picture of the day Plugins Songs Tutorials video Videos Web Development Web Development Software Wordpress You Tube youtube
Fahd Murtaza, Web Developer, Programmer, Wordpress Expert
U
This is portfolio & blog of senior web developer Fahd Murtaza, who has 9 years experience in: website development, WordPress, drupal, CMS and CRM application development with passion of making web better; one site at a time.


@
Mobile +968 93 678 199
email info@fahdmurtaza.com
Google Talk: fahdim@gmail.com
Skype fahd.murtaza
Location Muscat, Oman.


_
Developed using my beloved, love of my life, WordPress, built on the responsive, grid based, mobile optimised, Foundation Framework, and a modified Foundation theme. More Info →


Follow Fahd: Twitter / Google+ / Instagram / Facebook / Dribbble / Tumblr / Posterous/ flickr /
Copyright © 2006-2013 Fahd Murtaza

Skip to toolbar
    • WordPress.org
    • Documentation
    • Support Forums
    • Feedback
Log Out