PHP generates static issues, include content fails to generate 20

Updated on technology 2024-05-23
17 answers
  1. Anonymous users2024-02-11

    First make sure your PHP has short tags enabled.

    Otherwise, please use it. inlcude is applied as include('');or includ'head..html';

    In addition, the PHP file should be run in a server environment.

    Check whether the service is enabled.

  2. Anonymous users2024-02-10

    The landlord eh. Excuse me, first of all, what exactly did you write"Still is?

    If it's the former, make up the basics.

    If it's the latter, it's bound to generate content.,The first floor is wrong.,PHP written in HTML can be interpreted by Apache.。

    If the latter doesn't build, check your configuration.

    Got it. But, landlord, since you have chosen to read it with @readfile().

    You should know that @readfile process files in the form of a character stream.

    Apache ignores these character streams entirely.

    PHP doesn't run at all.

    You want PHP to run, why not include, require.

  3. Anonymous users2024-02-09

    It's an html file and can't run php.

    Renamed. bar.

  4. Anonymous users2024-02-08

    Then you can just include this in the homepage.

    Why do you put him on other pages?

    Isn't it possible to find trouble on your own?

  5. Anonymous users2024-02-07

    Here are the two directories up, so yours shouldn't have one.

    It should be include('../ubfi/');

  6. Anonymous users2024-02-06

    You did one more layer online, it should be....That's enough, you move up two floors.

  7. Anonymous users2024-02-05

    It must be the wrong path to be included!

  8. Anonymous users2024-02-04

    Then add "...or "".

    ."Indicates the relative directory, for example, there are directories a and directories b in the same directory, and then the files below directory a are called the files under directory b"include ../b/"

    or ""."include /b/"

    It's the same.

  9. Anonymous users2024-02-03

    I'm going to take it in an extreme way. But thoroughly.

    Define constants and record absolute paths.

    define('__rootdir__',$_server['document_root']);

    This is because all references are absolute physical paths to the file. There is no such problem.

  10. Anonymous users2024-02-02

    If it's UTF-8, you can't choose the BOM signature, so PHP will have spaces, which is very inexplicable.

    It is to use Windows Notepad to open and save as UTF-8, there will be such a problem, you can open it with dw, and then page settings, encoding settings, cancel the BOM signature in the save, all pages can not have.

  11. Anonymous users2024-02-01

    It should be caused by the inconsistent file coding of the program file.

  12. Anonymous users2024-01-31

    Usually PHP files will use the ending if ?> there are spaces after that, which will be parsed into spaces in the HTML output. As a result, there will be inexplicable gaps.

    Please check that the included files contain any other characters before and after the php tag.

    It's a good practice now to use ellipsies for php files.

    For example, echo'test';

  13. Anonymous users2024-01-30

    The included files are in UTF8 encoded format.

    Should be saved as a UTF8 format encoding for nobom.

  14. Anonymous users2024-01-29

    Hello, change include to include once, everything else remains the same.

    include once is the meaning of being quoted only once. There will be no repetition.

  15. Anonymous users2024-01-28

    The server may set the error reporting and display errors parameters to prevent error reporting.

    As for the upload is not normal, check whether the case is correct, and the Windows system is not case-sensitive.

  16. Anonymous users2024-01-27

    I don't understand what it means to not show everything after include.

  17. Anonymous users2024-01-26

    If the path is a problem, the path before uploading may be an absolute path, and it should be changed to a relative path.

Related questions
9 answers2024-05-23

Forehead. I'll come and help you in the evening. Went to work.

6 answers2024-05-23

I also happened to be learning php, mysql under lamp recently, I understand your question. >>>More

6 answers2024-05-23

ASP generates static pages very easily, in fact, ASP is a dynamic web page. When a user accesses an ASP page, the page immediately reads the contents of the database and outputs it to the user for browsing. Here, every time a user browses a web page, ASP reads the database once, so it's called a dynamic page. >>>More

12 answers2024-05-23

Variables can be included in double quotes, where $str reads look at the sea"$str";It will recognize that $str is a variable and explain the contents of the variable to get it"look at the sea", and single quotes'$str'It is to output the string $str, depending on the situation. Sometimes you need to make up a SQL statement with some variables, and double quotation marks are useful. >>>More

15 answers2024-05-23

time() returns the UNIX timestamp of the current time, i.e., the number of seconds from the UNIX era (00:00:00 GMT January 1, 1970) to the current time. >>>More