Table problems and file upload code: echo"
";
Echo"
";Echo"
ID |
NAME |
";While ($ row = mysqli_fetch_assoc ($ result )){Echo"
";Echo"
{$ Row ['id']} | ";Echo"
{$ Row ['name']} |
"; Echo" |
";}Echo"
";
Echo"
";
The error code of the file is correct, and the configuration file is okay, but it cannot be found.
Reply to discussion (solution)
The pasted code is not an error code snippet.
This error is reported. this interface is displayed after running.
Error lines: 12, 15, 16, 17, and 18
How many lines do you post?
File Upload
/**
* Created by PhpStorm.
* User: mac
* Date: 2016/4/7
* Time:
*/
// $ _ File: file Upload variable
// Print_r ($ _ FILES ['myfile']);
Require_once 'upload. php ';
If ($ _ FILES ["file"] ["error"]> 0 ){
Echo "error:". $ _ FILES ["file"] ["error"]."
";
} Else {
Echo "name:". $ _ FILES ["file"] ["name"]."
";
Echo "type:". $ _ FILES ["file"] ["type"]."
";
Echo "size:". ($ _ FILES ["file"] ["size"]/1024). "kb
";
Echo "Stored in:". $ _ FILES ["file"] ["tmp_name"];
}
You didn't submit a form to directly access doAction. php?
Print_r ($ _ FILES ["file"]); paste the result and check it.
Notice: Undefined index: file in D: \ phpStudy \ www.\ 123 \ document \ doAction. php on line 21
Yes. I found a few k images to upload.
The code is incomplete and no error code is provided.
The above is all my php code, and the upload function is very short.
Are you sure you want to stick your file name out, and the full page containing the website path of the error page? I guess your upload. php is an html page.
Yes,
Please use the official web Server Test form to submit
I saw a long port number in your project. it is obviously the web server that you are using with the development tool.
Thanks. I can put it in 8080. can you help me check the table problem? it's the extra column.
Echo"";
Echo"{$ Row ['id']}";
Echo"{$ Row ['name']} </Td> ";
Echo"";
I'm careless. thank you!