Url returns 404 using page and file combo

Using a table $p to display filenames and ultimately link to pdf. The return is a 404.
The requested URL /Applications/MAMP/htdocs/tl/content/2-products/manuals/98-0001-08led-bar-bb.pdf was not found on this server.
The pdf is found if I remove the applications/mamp from url. Just confirming on a host server if file would be found? Different way to implement? Thanks

<li>
<a  class="dropdown-item" href="<?php echo (page('products/manuals')->file($p->fpmanual())); ?>"><?php echo html($p->fpmodel()); ?></a>
                              <?php endforeach; ?>
                              </li>```

You are not outputting an URL:

<?php foreach($items as $p): ?>
<li>
<a class="dropdown-item" href="<?php echo page('products/manuals')->file($p->fpmanual())->url(); ?>"><?php echo html($p->fpmodel()); ?></a>
<?php endforeach; ?>
</li>
```

thanks for addition of url. also had to remove extra parens

<?php foreach($items as $p): ?>
<?php if($document =  page('products/manuals')->file($p->fpmanual)): ?>
<li><a class="dropdown-item" href="<?php echo
page('products/manuals')->file($p->fpmanual)->url(); ?>"><?php echo
html($p->modelnum); ?></a></li>
<?php endif ?>
<?php endforeach ?>
<?php endif ?>

If you use the $document variable in your if statement, you might as well use it further down the route and there is an extra endif at the end of your code snippet as well as missing parens after modelnum:

<?php foreach($items as $p): ?>
  <?php if($document =  page('products/manuals')->file($p->fpmanual)): ?>
    <li><a class="dropdown-item" href="<?php echo
$document->url(); ?>"><?php echo
$p->modelnum()->html(); ?></a></li>
  <?php endif ?>
<?php endforeach ?>

Oh, and BTW: Those three backticks always need two be on separate lines before and after the code block to format code properly :wink: