• I am trying to load an html file using the file_get_contents function but getting

    Warning: file_get_contents(booking_email.html): failed to open stream: No such file or directory in /home/xsbagg5/public_html/wp-content/themes/i-excel/page-book2.php on line 265

    The file booking_email.html is in my them folder with all of my other files.

    Should I be using a different command?

Viewing 3 replies - 1 through 3 (of 3 total)
  • anonymized-13749270

    (@anonymized-13749270)

    Maybe giving an absolute path would help:

    $file = plugin_dir_url( __FILE__ )."booking_email.html";
    file_get_contents($file);

    Thread Starter shane.sanders

    (@shanesanders)

    That seemed to fix that problem. Thank you Samuel.

    anonymized-13749270

    (@anonymized-13749270)

    Oh great!

    You are welcome Shane !

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘file_get_contents’ is closed to new replies.