0

我从这个链接中找到了代码

并具有相同的代码,但它不工作。它在说我

The page at 'https://suryaprakashanmandir.com/something.php'was loaded over HTTPS, but requested an insecure script 'http://www.google.com/inputtools/request?text=hello&ime=transliteration_en_ml&num=5&cp=0&cs=0&ie=utf-8&oe=utf-8&app=jsapi&uv&cb=_callbacks_._0k5mbnkfb'. This request has been blocked; the content must be served over HTTPS.

我的 something.php 的完整代码如下:-

<script type="text/javascript" src="https://www.google.com/jsapi">
</script>
<script type="text/javascript">

  // Load the Google Transliterate API
  google.load("elements", "1", {
        packages: "transliteration"
      });

  function onLoad() {
    var options = {
        sourceLanguage:
            google.elements.transliteration.LanguageCode.ENGLISH,
        destinationLanguage:
            [google.elements.transliteration.LanguageCode.HINDI],
        shortcutKey: 'ctrl+g',
        transliterationEnabled: true
    };

    // Create an instance on TransliterationControl with the required
    // options.
    var control =
        new google.elements.transliteration.TransliterationControl(options);

    // Enable transliteration in the textbox with id
    // 'transliterateTextarea'.
    control.makeTransliteratable(['transliterateTextarea']);
  }
  google.setOnLoadCallback(onLoad);
</script>
<textarea id="transliterateTextarea" style="width:600px;height:200px"></textarea>

我的根文件夹中有一个 .htaccess 文件,例如

RewriteEngine On
RewriteCond %{HTTP_HOST} ^suryaprakashanmandir\.com [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.suryaprakashanmandir.com/$1 [R,L]
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_FILENAME} !-l RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]

4

0 回答 0