How can i follow for example this *.phtml file? there is no instantiation of a class but uses '$this' so how can i know what object this is? you can understand my conversion, when i used c++ years ago, the include to an object was added at the top of the page so you had some idea where to look...
I will add to existing see what i can find, is there anyway of finding the class associated to "$this" at that point? "$this" is used all over this project with no real clue to what object it actually is, is that bad practice?
I thought so, trouble is, I cannot find "loggedInUser" anywhere declared other than like the above, its not a function, it looks like part of an array, how could I search for it to see how its contructed
My problem is I have theme files extension .phtml using code within the file and no include classes at the top of the page and the use of the word $this in the file so I have no reference has to what object it is?
Fatal error: Using $this when not in object context
if...
how do I fix these warnings?
Warning: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most...
Sorry, this code, index runs the code below, where does it go from here, tiny lesson would be helpful, ive seen some php but this project is very difficult to follow
namespace Cube;
use Cube\Loader\Autoloader;
class Application
{
/**
*
* the name of the module bootstrap files...
After this call... where does this go? and if someone clicked a link that didnt run index.php how would it run bootstrap?
ini_set('display_errors', 1);
error_reporting(E_ALL);
define('APPLICATION_PATH', realpath(__DIR__));
set_include_path(APPLICATION_PATH . DIRECTORY_SEPARATOR . 'library')...
It is and this is working for clarification
$pdo = new Pdo('mysql:dbname=badbidder1;host=localhost', $username, $password);
//get the import number that is left and id
$stmt = $pdo->query("SELECT id,importsNumber FROM `bad_users` where username ='carquest'");
while ($row = $stmt->fetch())
{...
I'm not sure if PDO is built in PHP so are there any includes required top of a page to run a query?
$stmt = $pdo->query("SELECT id,importsNumber FROM table");
This give me error - Undefined variable: pdo
I see, its very hard to follow, i have my own import code, all i need is the connection to db and execute methods but its ny on impossible to find. Even in the view folders wrapped in html with extension .phtml is the use of $this-> outside its class, there are no includes in any file so i'm...
Ok why this section on tek-tips isn't busy thought I would ask the question, what is bootstrap doing in this function?
public function bootstrap()
{
if (!empty($this->_options['modules'])) {
$this->_moduleManager = ModuleManager::getInstance()...
Yes i sussed the xml out and I copied the selling section then renamed the tab, but soon as a added a new file name (like ie: test.phtml) file not found, i will have a look in app folder and config
Thanks, i get that that, its member functions, would there be a library somewhere holding the files necessary for the site like "vacunita" explains?
just adding a another file ie: test.phtml gives an error so there must be other areas that need test.phtml adding
Ok i will, could i ask, what is this doing?
$application = Cube\Application::init(include 'config/global.config.php');
$application->bootstrap()
->run();
using this link and uploading test.phtml
http://www.mysite.co.uk/index.php?module=members&controller=reputation&action=test
I get
404 Error
The page you are looking for could not be found.
Try checking the URL for errors, then hit the refresh button on your browser.
I may as well show...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.