-
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.
-
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.
-
It's an html file and can't run php.
Renamed. bar.
-
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?
-
Here are the two directories up, so yours shouldn't have one.
It should be include('../ubfi/');
-
You did one more layer online, it should be....That's enough, you move up two floors.
-
It must be the wrong path to be included!
-
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.
-
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.
-
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.
-
It should be caused by the inconsistent file coding of the program file.
-
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';
-
The included files are in UTF8 encoded format.
Should be saved as a UTF8 format encoding for nobom.
-
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.
-
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.
-
I don't understand what it means to not show everything after include.
-
If the path is a problem, the path before uploading may be an absolute path, and it should be changed to a relative path.
Forehead. I'll come and help you in the evening. Went to work.
I also happened to be learning php, mysql under lamp recently, I understand your question. >>>More
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
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
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