Jump to content

Recommended Posts

You cannot assign a variable to a property in the property declaration.  Where in the flow of your script are you trying to assign this? Are you wanting to instantiate an object and pass an arbitrary value to $template_dir ?  You can do something like this:

 

class blah {
  var $template_dir = '';

  function __construct($dir) {
    $this->template_dir = $dir;
  }
}

$something = new blah('some/random/path');

Link to comment
https://forums.phpfreaks.com/topic/168575-simple-var-question/#findComment-889217
Share on other sites

Well what i'm using is a premade template engine (template lite) which has a class with the configuration var's in it. Instead of having ./style/default/ in the var I defined $def_dir as the same thing but it pulls from the database for easier configuration. I'm new with OOP so bare with me :)

Link to comment
https://forums.phpfreaks.com/topic/168575-simple-var-question/#findComment-889219
Share on other sites

I hate to go offtopic with this threat but another thing i've been having a problem with is reCaptcha. For some reason it wont send the variables.

http://completeladders.com/development/v1/user.php

Can anyone see something on that page that would be preventing it? It's driving me crazy.

Link to comment
https://forums.phpfreaks.com/topic/168575-simple-var-question/#findComment-889301
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.