如何在Google Docs中显示数据库中的pdf文件?

Here is my code.

<a href="http://docs.google.com/viewer?url<?php echo $file_row['floc']; ?>"> <i class="text-warning">View </i></a>

It echos the file.pdf in the database, when I clicked the link I want to redirect in Google docs. the google docs said they cannot find the specified folder.

Can someone help me to view the files into Google Docs after i clicked the link?

Try rawurlencode() and do not forget about = here ?url=:

<a href="http://docs.google.com/viewer?url=<?php echo rawurlencode($file_row['floc']); ?>">

But your $file_row['floc'] does not contain an 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 a schema and a domain:

<a href="http://docs.google.com/viewer?url=http://domain.com/<?php echo rawurlencode($file_row['floc']); ?