<?php /*include_once("myconfig.php");*/ include '.././classes/mymodel.php'; include '.././classes/myview.php'; /*CONTROLLER CREATES THE MODEL*/ $theActualModel = new MyModel(); /*TEST IT IS INSTANCIATED*/ $myTemp = $theActualModel->getQueryValue(); echo $myTemp; echo "<p></p>"; /*CONTROLLER FINDS OUT THE QUERY STRING APPENDED TO THE URL, REVERSES IT, AND SENDS IT TO THE MODEL*/ /*... BUT MAYBE IT WOULD BE BETTER FOR THE MANIPULATION TO OCCUR INSIDE THE MODEL?*/ $theURLStuff = strrev($_SERVER['QUERY_STRING']); $theActualModel->setQueryValue($theURLStuff); /*CONTROLLER CREATES THE VIEW*/ $theActualView = new MyView(); /*TEST THE VIEW WORKS*/ $myTempViewModelText = $theActualView->displayTheInfo(); /*echo $myTempViewModelText ; */ echo "<p>Here is the number at the end of the URL, but reversed.</p>"; /*CONTROLLER GETS TEXT FROM THE MODEL AND SENDS TO THE VIEW*/ $theActualView->setInfoToDisplay($theActualModel->getQueryValue()); /*CONTROLLER TELLS VIEW TO DISPLAY THE TEXT*/ $theActualView->displayTheInfo();