从原本的框架文件拆解出一函数.有关问题是不知道如何调用.

WBOY
Release: 2016-06-13 13:51:36
Original
943 people have browsed it

从原本的框架文件拆解出一函数..问题是不知道怎么调用...
function appFormPls($param) {
  ...
  ...
  ...
TPL::module('appform', array('event' => $event,'list' =>$list));


如上,原本是框架文件里的一堆函数文件. 现在不使用框架,只需要用这一个函数, 

可是,可是不知道怎么调用.....巨汗....不要丢我番茄,先拜谢.

现在我在index里直接INCLUDE了这函数相对应的APPFORM.PHP. 但这个文件需要此函数里定义的两个变量数组.

恩.主要是不知道最后一行TPL::是什么来头,,拆出文件的话这句要怎么处理..函数是否还是单独作为一个文件? index里如果不用include 的话用什么语句调用函数?


我知道应该从基本学起,可我一个小ASER就用PHP这么一回,求各位大虾给力

------解决方案--------------------
appformpls 这是你要用的类
appFormPls 这是类里的方法

TPL::module('appform', array('event' => $event,'list' =>$list,));

是不是ide编辑工具 是的话 ctrl 鼠标点击 TPL就能进去那个文件了.看看是什么东东,基本可能需要再include 这个文件就可以了. 不需要new 了 我以为是要提出里面的什么功能 .
------解决方案--------------------

探讨

那那那再问个...在INDEX的HEADER前面INCLUDE类文件比较好,还是在BODY里inCLUDE类文件? 简例里的各种写法太让人迷惑了..
Related labels:
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!