Forums

[resolved] Config file, legitimate question (3 posts)

  1. robine
    Member
    Posted 2 years ago #

    The config-sample.php file in the download is not closed with ?>
    Is this right?

  2. jonradio
    Member
    Posted 2 years ago #

    Note the following from the official PHP documentation:

    Note: The closing tag of a PHP block at the end of a file is optional, and in some cases omitting it is helpful when using include() or require(), so unwanted whitespace will not occur at the end of files, and you will still be able to add headers to the response later. It is also handy if you use output buffering, and would not like to see added unwanted whitespace at the end of the parts generated by the included files.

    ref. - http://www.php.net/manual/en/language.basic-syntax.instruction-separation.php

    All that said, I just checked my most heavily used WordPress site and wp-config.php ends with ?> but wp-config-sample.php does not. Go figure!

    Truth be told, I have seen problems with "whitespace" after ?> in a php file in WordPress.

  3. robine
    Member
    Posted 2 years ago #

    Ahh, thanks abunch. I am having trouble with updating automaticly, thought this could be the problem..

Topic Closed

This topic has been closed to new replies.

About this Topic