duanan1228 2014-12-24 19:29
浏览 9
已采纳

这有什么问题包括我在php中做的声明? [关闭]

<?php

    include("articles/article_6.html");
?>

i wanted the article to be posted on my website but it gives the error:

Parse error: syntax error, unexpected 'version' (T_STRING) in /opt/lampp/htdocs/white_coats/articles/article_6.html on line 1

  • 写回答

1条回答 默认 最新

  • dongxiaoke2018 2014-12-24 19:40
    关注

    article_6.html has no php tags. its just a word file that was saved in .html so that it could be displayed on the website. it's just an article with some pictures.

    Then you don't include it. You read it's contents and print em. Include statements are nearly always for code includes and not plain html or text content.

    echo file_get_contents("articles/article_6.html");
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?