Address problem of thinkphp link jump

129 0

Assign $ to jumpurl variable in one method in a module, this-> assign ("jumpurl","___APP__/Public/main"); then $ this-> success ( ); in the success template, a connection to <a is made, where the address isn't preceded by the preceding http: What about//localhost/? do you want to manually add http: Localhost? there's no other way.

2 Answers

82 2

Your question format is somewhat ambiguous, and it's better to make sure you're doing so.

$this->assign("jumpUrl","___APP__/Public/main");

It should be.

$this->assign("jumpUrl",__APP__."/Public/main");
...