Home Backend Development PHP Tutorial TP,控制器$this->只得调用当前控制器方法、属性

TP,控制器$this->只得调用当前控制器方法、属性

Jun 13, 2016 am 10:50 AM
action display gt index this

TP,控制器$this->只能调用当前控制器方法、属性。
1:昨天还好使的,

PHP code

1

<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--><?php class HelloAction extends Action{            public function Index(){               $this->            }        }?&gt;

Copy after login

正常情况下是可以提示父类的方法,我这里只提示一个Index。
然后我就看了一下TP的core目录里面,有assign这个方法,就是不能调用。

2:然后我就在不提示的情况下手动的$this->display,然后提示模板不存在,

模板不存在[D:/wamp/www/Tphp/Tpl/Home/Hello/index.tpl]

可是在这个目录下,的的确确有这么个文件。


还有,我的Action报红了,用的phpstorm,就是没看到错误在哪。。。
报红是在不能提示之后才注意到的。。。

------解决方案--------------------
但为什么不提示呢?
谁提示???
------解决方案--------------------
可能哪有冲突的地方,导致的吧!
------解决方案--------------------
PHP我也開發了好幾年了,但是為何你的問題我橫看豎看就是看不懂你要問啥呢?看來我老了.

探讨

但为什么不提示呢?
谁提示???

------解决方案--------------------
看下你的$this->display();怎么写的。
------解决方案--------------------
runtime文件没重新编译吧
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

What file is index.html? What file is index.html? Feb 19, 2024 pm 01:36 PM

What file is index.html?

What are the differences between Huawei GT3 Pro and GT4? What are the differences between Huawei GT3 Pro and GT4? Dec 29, 2023 pm 02:27 PM

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 Fujifilm X-M5 price expectations rise as leaked selfie display adds complexity to the formerly affordable camera line Sep 07, 2024 am 09:34 AM

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 Samsung: New, large display based on E Ink technology displays colors and communicates wirelessly Jun 19, 2024 pm 03:37 PM

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

Fix: Snipping tool not working in Windows 11 Fix: Snipping tool not working in Windows 11 Aug 24, 2023 am 09:48 AM

Fix: Snipping tool not working in Windows 11

Comparison: Apple Studio Display vs Samsung Smart Monitor M8 Comparison: Apple Studio Display vs Samsung Smart Monitor M8 May 11, 2023 pm 10:46 PM

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 DJI Osmo Action 5 Pro: Release date mooted as retailer reveals launch pricing that could undercut GoPro Hero 13 Black Sep 04, 2024 am 06:51 AM

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 Apple Studio Display's power cord is detachable, but requires special tools May 17, 2023 pm 03:05 PM

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

See all articles