I saved the link refrence in Databse like /PEDB/SupportDoc/5/PRFF or0444.pdf
and used <a href=".$r1[10]." target=_blank>View</a>
to show the documents but when I click on view its not showing document because link break where space put in and show blank in explorer like /PEDB/SupportDoc/5/PRFF
ayesha789
7
Posting Pro in Training
Recommended Answers
Jump to PostI think this is what you are looking for
$a = "/PEDB/SupportDoc/5/PRFF or0444.pdf"; $b = urlencode($a); echo "<a href='{$b}'>Click</a>";
Jump to PostI think its not because of space.
Your href link must start with http:// to work in browser.
When you click on link what is url shown in browser?
Jump to PostYou don't have to have http:// in the href.
The space shouldn't be there. Filenames should not have spaces in them. I'd go at it to change them - change them from space to underscore or similar.
Jump to PostI have checked with test name.txt and it works fine in my browser.
and if i give only google.com in my href it won't work.You don't have to have http:// in the …
All 14 Replies
jigarvyas
5
Newbie Poster
ayesha789
7
Posting Pro in Training
ayesha789
7
Posting Pro in Training
vibhaJ
126
Master Poster
diafol
vibhaJ
126
Master Poster
ayesha789
7
Posting Pro in Training
ayesha789
7
Posting Pro in Training
diafol
holy-food
0
Newbie Poster
urtrivedi
276
Nearly a Posting Virtuoso
lovewow
0
Newbie Poster
Stefano Mtangoo
455
Senior Poster
ayesha789
7
Posting Pro in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.