We have an xml word doc with image on title page that downloads correctly via ftp but the image is always missing if we try to download it via a link in an html page. We're using Firefox if that makes a difference. But we also tried it using Opera, with the same results.
Here's the link we're using:
$fileDest = './mydoc.xml';
<a type="msword" href="<?php echo $fileDest; ?>"><input type="button" value="Download Document" /></a>
You serve different files via FTP and HTTP.
Related
As the title says. How can i download a file off a network drive? I currently have this, it opens the file in my Internet Explorer browser but it's supposed to download it. (Or give the option to open or download).
$search is the input given by the user.
<a type="button" class="UitslagKnop" href="file:\\\\domain\map\map\map\map\<?php echo $search; echo '_REV_'; echo $Revlv2; echo '_uitslag';?>.dxf" download><span>Uitslag</span></a>
You don't need the file:\\ in the href of the link. Testing your code locally doesn't initiate the download like you're attempting, but removing that prefix in the href does. Simply use:
<... href="\domain\map\map\map\map\<?php echo $search.'_REV_'.$Rev1v2.'_uitslag';?>.dxf" ...>
I'd like to give the user the possibility to download or stream the same media. I tried this way (adding download) but it doesn't work:
<a target='_blank' href='http://another/site/file.mp4' download>DOWNLOAD</a>
<a target='_blank' href='http://another/site/file.mp4'>STREAMING</a>
I create the page using php 5.6
Note that the file is always the same: http://another/site/file.mp4 and comes from a different domain (The <a> urls are in site1 and the media is in site2 )
The download attribute on <a> tags only work with the following:
The URL must be the same origin as the HTML document.
The browser must be Chrome, Firefox, Edge, Safari (10) or Opera (15)
I'm going to assume the URL is from another website, and that's why it's not working.
I need to display a PDF on a website and have it embedded inline.
The following code works if the data attribute is local, but not remote. I just get a large grey box in place of the PDF. I'm open to any solution as long as it works in all browsers. We are using Rails 3 and jQuery.
<object data='https://remotesite.com/uploads/pdf/5/mypdf.pdf' type='application/pdf' width='100%' height='100%'>
<p>
It appears your Web browser is not configured to display PDF files.
No worries, just <a href='https://remotesite.com/uploads/pdf/5/mypdf.pdf'>click here to download the PDF file.</a>
</p>
</object>
And i try this code
<iframe src="http://people.seas.harvard.edu/~chong/pubs/oopsla04.pdf" width="100%" height="300">
<p>Your browser does not support iframes.</p>
</iframe>
But not work with Arabic file like " ملف المتسابقين.pdf"
Thanks,
I have the option for viewing or downloading files on a site.
For PDF's it works fine, I expect it will with images too but there are other document types that I'm using such as Keynote, Word, Pages, Excel, etc etc. When I select to view these they open a blank window and are downloaded instead.
Is there a way around this at all?
<div class="viewAndDownload">
<p><strong>Views: </strong><?php echo $views ?><span> </span> <img src="../images/book_next.png" alt="view file" border="0"/></a></p>
</div>
<div class="viewAndDownload">
<p><strong>Downloads:</strong> <?php echo $downloads ?> <span> </span><img src="../images/disk.png" alt="view file" border="0"/></p>
</div>
Thanks for any help!
Short of finding a viewer or browser add-on this is not possible. I would certainly not recommend it with Excel due to the possibility malware through macros. It is possible with PDF's because Adobe Reader acts as a viewer and add on for most browsers. It is also possible with Video files like .mp4 or Wmv(I.e 8+) because these browsers have add-ons or players built in for these files. Sadly, for using things like Excel and word these do not exist. The only work around I can think of, is loading the data from the file for example CSV from Excel. I have created a generic excel reader like that before.
I have two files, one with HTML code when I've diferent photo albums links, example:
<a href="albumprueba.php"><img class="fancyboxi"
src="Libro Fez/Libro Fez - 001.jpg" alt="image19"
width="91%" height="56" /></a>
And another file (is php) I've a routine that scans all the photos in a folder, and shows photos:
<a class="fancyboxi" data-fancybox-group="gallery" title="Laurea"
href="Libro Fez/<?php echo $archivos[$imagen_a_empezar]?>"><img
src="Libro Fez/<?php echo $archivos[$imagen_a_empezar]?>" alt="" width="19%"/></a>
I would like to open the HTML file from an album and open a fancybox with all the photos that showing the routine in PHP file.
I've tried to do in the HTML file this, but doesn't works:
<img src="Libro Fez/Libro Fez - 001.jpg" alt="image19" width="91%" height="56" />
Any idea? thank.
Your href is certainly malformed.
albumprueba.php?Libro Fez/Libro Fez - 001.jpg
That isn't an address as URLs cannot have spaces (go to it manually and check what the address is in the navigation bar in your browser). Moreover it's just landing on a jpeg - are you sure you want this link to be to a single image?
Other than that the anchor should work. Are you getting a 404 error after following the link? If you want the other html file to be perptually viewable from the parent page you should consider using an iframe.