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

  • Home
  • SEARCH
  • 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 6675711
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:53:35+00:00 2026-05-26T03:53:35+00:00

Hello stackoverflow users, My problem is about php dynamic link creation. I try to

  • 0

Hello stackoverflow users,

My problem is about php dynamic link creation.

I try to create dynamic link like;

<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="tr" xml:lang="tr">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-9" />
        <title>Dilşad Çiçekçilik</title>    

        <script type="text/javascript" src="yoxview/yoxview-init.js"></script>

    </head>
    <body>
        <div class="yoxview">
          <?php 

          ...

          for($i=0;$i<$images->num_rows();$i++) {
              echo "<a href='".$imagesArr[$i]."' ><img src='".$thumbsArr[$i]."' /></a>";
          } 

          ....

          ?>
          <?php echo $this->pagination->create_links(); ?>
        </div>
    </body>
</html>

my problem start from the line;

echo "<a href='".$imagesArr[$i]."' ><img src='".$thumbsArr[$i]."' /></a>";


$imagesArr[$i] contains the url -->"yoxview/gallery/sevgiliye/images/anneye10.jpg"

$thumbsArr[$i] contains the url -->"yoxview/gallery/sevgiliye/thumbs/anneye10.jpg"

But, generated html page created to link like this:

.http://localhost/codeigniter/galleryController/index/yoxview/gallery/sevgiliye/images/anneye10.jpg

.http://localhost/codeigniter/galleryController/index/yoxview/gallery/sevgiliye/thumbs/anneye10.jpg

my controller name “galleryController” and my function name “index” and other base url are adding before the href link.

I want to created link which contains only

yoxview/gallery/sevgiliye/images/anneye10.jpg

this url.

How can i achive this ?

Thank you.

  • 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-26T03:53:36+00:00Added an answer on May 26, 2026 at 3:53 am

    This has nothing to do really with your code, and is a function of how browsers process non-absolute urls. You’ve not put a / or http://example.com/path/to/page type “root” on your urls, so the browser is taking the address of the page as it sees it (http://localhosthost/codeignitre/galleryController/index) and adding that to your non-absolute urls.

    You’ll have to use /yoxwview/gallery/etc... instead (assuming that’s a valid path on your server).

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

Sidebar

Related Questions

Hello StackOverflow community, The air.swf file referenced here: http://livedocs.adobe.com/flex/3/html/help.html?content=distributing_apps_3.html used to launch AIR applications
Hello again stackoverflow... Once again I have a troublesome problem. I have a page
Hello fellow StackOverflow users (or Stackoverflowers ?): I'm learning-by-coding WPF. I read several articles/saw
Hello fellow stackoverflow family members? I know it is un-efficient to create one extra
Hello good Stack Overflow people, I do have a business problem and would like
Hello stackoverflow world, I am stuck on a little problem with Java Plugin Framework
Hello Stackoverflow users, I have a question regarding an JQ UI widget im trying
Hello fellow Stackoverflow users, I have a page which does a AJAX request to
Hello stackoverflow community ! I am trying to figure out how to architect my
Hello StackOverflow'ers, I have a (flex) app that, on the click of a button,

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.