嵌入隨機MS Word的Word文檔,我發現在互聯網上嵌入一個MS Word文檔,工作,如果我硬編碼的網址:
<iframe src="http://docs.google.com/gview?url=https://d9db56472fd41226d193-1e5e0d4b7948acaf6080b0dce0b35ed5.ssl.cf1.rackcdn.com/spectools/docs/wd-spectools-word-sample-04.doc&embedded=true"></iframe>
然而,我想通過AJAX的URL,所以我改變了HTML來
<iframe src="{{cvUrl}}&embedded=true"></iframe>
但即使是硬編碼變量$scope
在我的JS:
$scope.cvUrl =
'http://docs.google.com/gview?url=https://d9db56472fd41226d193-1e5e0d4b7948acaf6080b0dce0b35ed5.ssl.cf1.rackcdn.com/spectools/docs/wd-spectools-word-sample-04.doc';
給出
Object not found!
The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error.
If you think this is a server error, please contact the webmaster.
Error 404
localhost
Apache/2.4.23 (Win32) OpenSSL/1.0.2h PHP/5.6.24
這似乎很基本 - 我做錯了什麼?
馬克西姆,我無法理解 - 這個完美的作品對我來說,*** *** BUT,我就使用本地主機' '或我的真實網站,我得到404「找不到」。如果我複製「找不到」URL並刪除尾部的'&embedded = true',系統會提示下載該文件,顯然它確實存在。任何想法我做錯了? – Mawg
@Mawg我不知道你的項目配置,所以不能給你正確的提示。嘗試谷歌嵌入式標誌的含義 –
我沒有看到代碼中的任何區別。你可以用'embedded'標誌做什麼,除了將它設置爲'true'。我無法在網上找到任何文檔 - 你有網址嗎?我想知道,如果這是一個許可的事情 - 也許在'htaccess'的東西... – Mawg