WordPress media_handle_sideload()抛出500内部服务器错误?

时间:2015-10-12 05:26:27

标签: wordpress

我想知道为什么这个图片网址在media_handle_sideload()上抛出500内部错误,甚至不允许脚本传递给错误处理部分?

  

$ thumb_url =" HTTP://cbproads.com/cbbanners/TBS830043971538.jpg" ;;
          $ POST_ID =' 853&#39 ;;
          $ tmp = download_url($ thumb_url);

import java.util.*;

public class PigLatin {

//This program prints our the pig latin version of words.

public static void main(String[] args) {
    Scanner console = new Scanner(System.in);       
    String word;

    System.out.print("Enter a word: ");
    word = console.next();

    pigLatinWord(word);

    System.out.println(word + " in pig latin is " + piglatin);
}

    //translates words starting with vowels, "th," consonants into piglatin
    public static String pigLatinWord (String word) {

    char c = word.charAt(0);
      String piglatin;
    if (c == 'a' ||  c == 'e' || c == 'i' || 
                 c == 'o' || c == 'u'){  //if word starts with a vowel
                 piglatin = word + "-hay";      
              } else if (word.startsWith("th")) {  //if word starts with "th"
                  piglatin = word.substring(2) + "-thay";
              } else {
                 piglatin = word.substring(1) + "-" + word.charAt(0) + "ay";
              }
      return piglatin;
    }
}

1 个答案:

答案 0 :(得分:0)

尝试使用path而非Url更多信息enter link description here

Ex URL : $thumb_url="http://cbproads.com/cbbanners/TBS830043971538.jpg";

Ex PATH : $thumb_url="var/www/cbbanners/images/TBS830043971538.jpg";

并使用Path not url link