Echo in the php page framework cannot output text, nor can it output text to the txt file on the hard disk. echo in the php page framework cannot output text, nor can it output text to the txt file on the hard disk, why?
Reply to discussion (solution)
First, what is the framework, and then paste the code for a look
It is the ecshop background after the major transformation. the top menu is a horizontal menu. the left menu is shown below, and the right menu is the framework I mentioned below.
Thanks for your help!
Confirm that the atxt () function is executed.
After confirmation, echo ('OK'); is this sentence executed? if there is a jump to the page, you can add an exit breakpoint.
Thank you, bamboo. I do not know whether the statements have been executed yet. the following statements have been executed. The two statements should have been executed too. The page has not been redirected.
It should have been executed. the subsequent statements are executed, and the results are returned. These two statements are certainly executed, and the page is not redirected.
It's hard to understand. The entire directory is completely controlled by everyone. why not?
Why?
1st certificate is guaranteed to have a.txt and permissions under atxt().
2. ensure that the parameters are correct.
According to what you said, echo always comes in. The probability of parameter errors is high.
You can try echo 'OK' in the if ($ _ REQUEST ['act '] = 'operate') {} and all other tests ';
It is estimated that it has not entered the if internal
Thank you, upstairs. now I find that every time I add this function to the program, the program is a bit abnormal. please help me to see what is wrong with this program? If the parameter is correct, a string is uploaded. The root directory of the entire website is also set to EVERYONE. I don't know what's going on! The page is blank.
function atxt($txt='') { $filename = 'a.txt'; $somecontent = $txt; if (is_writable($filename)) { if (!$handle = fopen($filename, 'w')) { exit; } if (fwrite($handle, $somecontent) === FALSE) { exit; } fclose($handle); } }
A blank space may be caused by a fatal error in the code.
You can enable the error message to check whether there are any errors.
The upstairs problem is solved.