Thinkphp3.1 and frameset display problems this post was last edited by EC_jouvie at 14:18:29
I am watching a video tutorial of thinkphp2.1. during the demonstration, the instructor shows index.html in the Index method in the index module, which is a framework containing frameset, and everything runs normally.
However, this problem occurs when I operate it myself. the page is blank and there is nothing. I use thinkphp of version 3.1.
Post Code
IndexAction. class. php
Class IndexAction extends Action {
Public function index (){
$ This-> assign ('title', 'title ');
$ This-> display ();
}
Public function top (){
$ This-> display ();
}
Public function menu (){
$ This-> display ();
}
Public function main (){
$ This-> display ();
}
Public function footer (){
$ This-> display ();
}
}
Index.html
{$ Title}// The $ title variable can still be displayed.
The index.html#top.html?menu.html#main.html#footer.html file is stored in the tpltemplate directory.
I edited it with DW. every time I modify/index. php/article.pdf and save the index.html page, the error prompt box will pop up, with the content as follows:
The file "F: \ Website \ SIM \ App \ Student \ Tpl \ Index \/index. php/Article \ footer" does not exist.
This path is clearly the path where the template is located. it should be the path where the module method is located?
The main problem is that the page cannot be displayed normally. I solved this problem first and solved the path problem. please advise. thank you.
Reply to discussion (solution)
This is not clear. I have encountered a problem once because the suffix of the footer file is wrong. The difference is l, which is htm.
Check your footer.html file. most of the files you have found are correct paths.
This is not clear. I have encountered a problem once because the suffix of the footer file is wrong. The difference is l, which is htm.
Check your footer.html file. most of the files you have found are correct paths.
This is not just the footer part, but the rest. the effect of the entire framework set is blank, and the frameset does not seem to be parsed. However, it is okay to check the source code.
I went back and flipped through my program. dw false positives are normal, but I can still display them on the background page.
I remember the default template in thinkphp tpl is default.
Check whether the/index. php/Article value is correct.
I went back and flipped through my program. dw false positives are normal, but I can still display them on the background page.
I remember the default template in thinkphp tpl is default.
Check whether the/index. php/Article value is correct.
It is really strange. I don't know if it is because I use TP3.1. After configuring the entry file and running it directly, there will be no default directory, and the tpl directory can be directly a template file. If you manually add the default directory and put the template file into it for running, an error is reported directly.
Now I found that the body tag exists in the source code of the frameset framework. I think this will make the problem happen. However, my template page does not contain the body tag. why is there a body tag?
Finally, it solved the problem. it turned out to be a fault caused by bom.
I also encountered the same problem. what does bom mean ???
Do not use tagsPack and remove, Problem solving
How did you solve this bom problem ???
It may also be that the URL is wrong. at first, the URL is written as redirect (/index. php);/index. php here is: localhost/blog/index. php/admin, and later added. '/Index/index.
Ask the landlord how to solve the problem. I also encountered the same problem. I searched many forums and couldn't find a solution.
But I didn't use a path like/index. php/Article/top, and I didn't use the body at all. As for the bom header, I also used the EditPlus editor to check whether it was available. But it still cannot be displayed.