Jump to content

Link to PDF


taxast

Recommended Posts

I'm trying to create a link to a .pdf file, but all i get is an error somewhere in kohana.php or a controller

Can someone please decrypt this error for me? :)

 

Here's the error code when i try to open the link:

thank you!

 

Page Not Found

 

The requested page was not found. It may have moved, been deleted, or archived.

 

system/core/Kohana.php [787]:

 

The page you requested, assets/algemenevoorwaarden.pdf, could not be found.

Stack Trace

 

    *

 

      Kohana::show_404(  )

 

    * system/core/Event.php [209]:

 

      call_user_func( Array

      (

          [0] => Kohana

          [1] => show_404

      )

      )

 

    * system/libraries/Router.php [163]:

 

      Event::run( system.404 )

 

    *

 

      Router_Core::setup(  )

 

    * system/core/Event.php [209]:

 

      call_user_func( Array

      (

          [0] => Router

          [1] => setup

      )

      )

 

    * system/core/Bootstrap.php [49]:

 

      Event::run( system.routing )

 

    * index.php [106]:

 

      require( system/core/Bootstrap.php )

 

 

and this is the HTML section:

 

<a href="<?php echo url::base(); ?>assets/algemenevoorwaarden.pdf"</a>

Link to comment
https://forums.phpfreaks.com/topic/192375-link-to-pdf/
Share on other sites

<a href="<?php echo url::base(); ?>assets/algemenevoorwaarden.pdf"</a>

 

run some error code. Echo that php section in a test to make sure it is getting what you want. To make sure it is in fact truly echoing what you want it to. In case you need to add a "/" to that code or something may be your issue.

Link to comment
https://forums.phpfreaks.com/topic/192375-link-to-pdf/#findComment-1013683
Share on other sites

Maybe, but I don't know truthfully. Maybe should try to using some other method of getting your url. Could be that is the issue too the the htaccess just doesn't like your method dunno. Try using some of these fucntions to see if can get what you want as well may be an easier work around instead.

cwd();
echo dirname(__FILE__);
echo dirname($_SERVER['PHP_SELF']);

Link to comment
https://forums.phpfreaks.com/topic/192375-link-to-pdf/#findComment-1013694
Share on other sites

<a href="<?php echo url::base(); ?>more_info/algemenevoorwaarden.pdf"</a>

 

Ok was just curious. That error almost reads as if it's just trying to find something that isn't there or may be that it will not let you into the folder to view anything except the index page. Check that you have permissions to access that file. These errors are like the check engine lights on a car sometimes... sure something is wrong... but what ha.

 

 

Btw I see something that maybe you are taking care of with the php call. Although if not then maybe that is it. The html link tag is never closed. <a href="<?php echo url::base(); ?>more_info/algemenevoorwaarden.pdf"> Something here</a>.  That shouldn't cause your error though, just a note to make sure your link will work when this does run.

 

Link to comment
https://forums.phpfreaks.com/topic/192375-link-to-pdf/#findComment-1013731
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.