douxian1923 2016-11-22 20:03
浏览 50
已采纳

Wordpress主题不在localhost上工作

I just installed WordPress locally (XAMPP) and added some plugins and using the tesseract theme. When I try to work on the website locally, I get a long list of errors but these errors disappear when am using the internet.

The errors:

Warning: fopen(): php_network_getaddresses: getaddrinfo failed: No such host is known. in C:\xampp\htdocs\wordpress\wp-content\themes\TESSERACT\functions.php on line 1255

Warning: fopen(https://s3.amazonaws.com/tesseracttheme/banner/admin_message.csv): failed to open stream: php_network_getaddresses: getaddrinfo failed: No such host is known. in C:\xampp\htdocs\wordpress\wp-content\themes\TESSERACT\functions.php on line 1255

Warning: feof() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\wordpress\wp-content\themes\TESSERACT\functions.php on line 1256

Warning: fgetcsv() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\wordpress\wp-content\themes\TESSERACT\functions.php on line 1257

Warning: feof() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\wordpress\wp-content\themes\TESSERACT\functions.php on line 1256

This is what I have on functions.php

function readCSV($csvFile){
    $file_handle = fopen($csvFile, 'r');
    while (!feof($file_handle) ) {
        $line_of_text[] = fgetcsv($file_handle, 1024);
    }
    fclose($file_handle);
    return $line_of_text;
}
  • 写回答

1条回答 默认 最新

  • dounuo9921 2016-11-22 20:35
    关注

    It happens because theme try to open files on remote server. That`s why you need an internet connection.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 shape_predictor_68_face_landmarks.dat
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料
  • ¥15 使用R语言marginaleffects包进行边际效应图绘制