php - How to display pdf files from database in Google Docs? -
here code.
<a href="http://docs.google.com/viewer?url<?php echo $file_row['floc']; ?>"> <i class="text-warning">view </i></a> it echos file.pdf in database, when clicked link want redirect in google docs. google docs said cannot find specified folder.
can me view files google docs after clicked link?
try rawurlencode() , not forget = here ?url=:
<a href="http://docs.google.com/viewer?url=<?php echo rawurlencode($file_row['floc']); ?>"> but $file_row['floc'] not contain url:
http://www.domain.com/uploads/4145_file_app-developer-guide-2.4.pdf a path only:
uploads/4145_file_app-developer-guide-2.4.pdf try add schema , domain:
<a href="http://docs.google.com/viewer?url=http://domain.com/<?php echo rawurlencode($file_row['floc']); ?
Comments
Post a Comment