Search Results

Search found 5 results on 1 pages for 'spoonface'.

Page 1/1 | 1 

  • Synchronising scripts / db / files from dev system to web server

    - by Spoonface
    I work as a freelance web dev, and up until now have been ftping my scripts / databases / static files to my web server manually, but I'm finding that is too error prone. So I'm looking for an app to automate uploading new and updated scripts / files / databases / etc. I know a lot of independent devs use WinSCP or Unison, but I don't think those apps can synch databases. Does anyone have any other suggestions? It doesn't need to be anything overly feature rich as I'm not working within a team or across multiple operating systems or anything like that. I can purchase any reasonably priced license if necesary. My work is primarily for PHP / MySQL / Apache on a Windows system, and then uploaded to a Linux / Apache server. thanks for your time!

    Read the article

  • [PHP] using the magic __set() method with 2D arrays

    - by Spoonface
    If I have the following registry class: Class registry { private $_vars; public function __construct() { $this->_vars = array(); } public function __set($key, $val) { $this->_vars[$key] = $val; } public function __get($key) { if (isset($this->_vars[$key])) return $this->_vars[$key]; } public function printAll() { print "<pre>".print_r($this->_vars,true)."</pre>"; } } $reg = new registry(); $reg->arr = array(1,2,3); $reg->arr = array_merge($reg->arr,array(4)); $reg->printAll(); Would there be an easier way to push a new item onto the 'arr' array? This code: 'array[] = item' doesn't work with the magic set method, and I couldn't find any useful info with google. Thanks for your time!

    Read the article

  • MySQLi error handling

    - by Spoonface
    Is it possible to specify that MySQLi sends any errors and warnings to the PHP default 'error_log' directive? I can't seem to find any error options for the class specification, and I don't wish to handle errors manually like so: if ($result = $mysqli->query("...")) { } else handle $mysqli->error;

    Read the article

  • logic before dispatcher + controller?

    - by Spoonface
    I believe for a typical MVC web application the router / dispatcher routine is used to decide which controller is loaded based primarily on the area requested in the url by the user. However, in addition to checking the url query string, I also like to use the dispatcher to check whether the user is currently logged in or not to decide which controller is loaded. For example if they are logged in and request the login page, the dispatcher would load their account instead. But is this a fairly non-standard design? Would it violate MVC in any way? I only ask as the examples I've read through this weekend have had no major calculations performed before the dispatcher routine, and commonly check whether the user is logged in or not per controller, and then redirect where necessary. But to me it seems odd to redirect a logged in user from the login area to account area if you could just load the account controller in the first place? I hope I've explained my consternation well enough, but could anyone offer some details on how they handle logged in users, and similar session data?

    Read the article

  • [MVC] logic before dispatcher + controller?

    - by Spoonface
    I believe for a typical MVC web application the router / dispatcher routine is used to decide which controller is loaded based primarily on the area requested in the url by the user. However, in addition to checking the url query string, I also like to use the dispatcher to check whether the user is currently logged in or not to decide which controller is loaded. For example if they are logged in and request the login page, the dispatcher would load their account instead. But is this a fairly non-standard design? Would it violate MVC in any way? I only ask as the examples I've read through this weekend have had no major calculations performed before the dispatcher routine, and commonly check whether the user is logged in or not per controller, and then redirect where necessary. But to me it seems odd to redirect a logged in user from the login area to account area if you could just load the account controller in the first place? I hope I've explained my consternation well enough, but could anyone offer some details on how they handle logged in users, and similar session data?

    Read the article

1