Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6087985
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:55:59+00:00 2026-05-23T11:55:59+00:00

In my view I’m trying to create an anchor tag but CodeIgniter is prepending

  • 0

In my view I’m trying to create an anchor tag but CodeIgniter is prepending my entire host before what I specify as href, therefor making it invalid.
I put this

<a href="file://////path_to/file/file.jpg">My File</a>

I get

<a href="http://localhost/index.php/file://////path_to/file/file.jpg">My File</a>

EDIT 3
This is my view, I realise i should not be calling a function in my view but in this case I had little option as something needs to get applied for each data item in the loop, I will try to change this but thats beyond my problem right now.
Wesley: I checked the soruce and it displays correctly in the source but in the browser it preappends the host so I guess this has nothing to do with code igniter afterall! How do I make sure it doesn’t happen?

            <td><?php 
            $this->ci = &get_instance(); 
            echo $currentData["field_one"] . " - <a href=\"file:://///" . $this->ci->myfunc($currentData["field_one"]); . "\">Log</a>"; ?>
            </td> 

EDIT 4

my html source

<a href="file:://///\\myhost.local.com\120">
View Log
</a>

my url address bar

http://myhost.local.com/myhostlocal/index.php/level/one/type/b/cc/ee/

the url it goes too when I mouse over the href

http:///myhostlocal/index.php/level/one/type/b/cc/ee/file:://///\\myhost.local.com\120
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T11:55:59+00:00Added an answer on May 23, 2026 at 11:55 am

    Looks like the browser is treating “file:://///” as a relative path. Why do you have 2 colons, do you need both? Removing one will provide a valid protocol, and the browser will start treating it as an absolute path.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

View Here: http://174.132.101.73/~ree/header/ I have a drop down box. I am trying to get
View is easy to be separated from MC, but how to separate M and
Table view cell imageView is working on the simulator but not on the device..
My 'VIEW' is ordered. But when I use a select to show its result,
create view Com as select C.id, IF(A.agree = null) THEN 0 else A.agree end
View <%= Ajax.ActionLink(Create, Create, ViewData.Model, new AjaxOptions { HttpMethod = POST })%> <%= Html.ValidationSummary(Create
CREATE VIEW View1 AS SELECT Col1, Col2, dbo.fn1(col2) as Col3 FROM TestTable /* --Instead
view.tag is only stored NSInteger Value. so, how to identify each view with NSString
View: <% form_tag(:action => 'create', :multipart => true) do %> Select CSV File: <%=
View this code: function testprecision(){ var isNotNumber = parseFloat('1.3').toPrecision(6); alert(typeof isNotNumber); //=> string }

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.