您好我有两行代码在一个单独的页面上调用两个函数我只是想知道如果我可以将它们放在一起,因此它们在同一时刻只运行一个在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();
?>
任何想法,将不胜感激
这真的有必要吗? –
@JohnConde是的,因为当我有他们这样的时候,他们将不会在他们在 – user3387522
的功能内运行我无法想象这是由于他们在两条线上。或者在别处发问。 –