TP,控制器$this->只得调用当前控制器方法、属性
Jun 13, 2016 am 10:50 AM
TP,控制器$this->只能调用当前控制器方法、属性。
1:昨天还好使的,
- PHP code
1 |
|
正常情况下是可以提示父类的方法,我这里只提示一个Index。
然后我就看了一下TP的core目录里面,有assign这个方法,就是不能调用。
2:然后我就在不提示的情况下手动的$this->display,然后提示模板不存在,
模板不存在[D:/wamp/www/Tphp/Tpl/Home/Hello/index.tpl]
可是在这个目录下,的的确确有这么个文件。
还有,我的Action报红了,用的phpstorm,就是没看到错误在哪。。。
报红是在不能提示之后才注意到的。。。
------解决方案--------------------
但为什么不提示呢?
谁提示???
------解决方案--------------------
可能哪有冲突的地方,导致的吧!
------解决方案--------------------
PHP我也開發了好幾年了,但是為何你的問題我橫看豎看就是看不懂你要問啥呢?看來我老了.
------解决方案--------------------
看下你的$this->display();怎么写的。
------解决方案--------------------
runtime文件没重新编译吧

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

What are the differences between Huawei GT3 Pro and GT4?

Fujifilm X-M5 price expectations rise as leaked selfie display adds complexity to the formerly affordable camera line

Samsung: New, large display based on E Ink technology displays colors and communicates wirelessly

Fix: Snipping tool not working in Windows 11

Comparison: Apple Studio Display vs Samsung Smart Monitor M8

DJI Osmo Action 5 Pro: Release date mooted as retailer reveals launch pricing that could undercut GoPro Hero 13 Black

Apple Studio Display's power cord is detachable, but requires special tools
