嗨,我有两行代码,在一个单独的页面上调用两个函数,我只是想知道我是否可以把它们放在一起,所以它们在同一时间运行,此时只有一个被调用时php函数运行。我的代码如下。
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile))
{
echo "File is valid, and was successfully uploaded.'n";
include "select.class.php";
these are the lines I want to combine >>$opt->addNewMediaCrossRef($Job, $Career, $Uniq_id);
these are the lines I want to combine >>$opt->addNewMediaRecord($Subject, $Section, $Principle, $Title, $Blurb, $Uniq_id, $Job, $Career);
}
在页面中,我想调用
中的函数class SelectList
{
和我所有的函数都在这里
}
$opt = new SelectList();
?>
如有任何意见,不胜感激
使用模板设计模式,您将能够一次调用来自不同类的所有方法