Jump to content
Larry Ullman's Book Forums

distortionzzz

Members
  • Posts

    8
  • Joined

  • Last visited

distortionzzz's Achievements

Newbie

Newbie (1/14)

3

Reputation

  1. HI Larry, Hmmm, maybe I shouldn't work so late at night, I've tested again on the environment I though was being case sensitive and it now isn't. I must have been doing something strange. I'll look though my Git logs to see what actually was happening. Thanks
  2. Hi, I have Apache v 2.2.22 and PHP 5.3.15 both compiled from source (no package manager) on my OSX 10.8 machine. Some things in PHP are case insensitive on my mac, like function and method names. Does anyone know a way I can force PHP to be case sensitive all of the time. I've Googled it, but didn't find much of any use Thanks a lot Simon
  3. Hi all, The more I'm dabbling with Yii, I'm disliking accessRules, it doesn't seem to work how I would like it and it is quite limiting, I don't like having to define specific usernames which can access an action. I read an article on the Yii website which I can link to if I'm allowed. Showing how you can very simply perform a check from each individual actions method (1 line of code and a new method in the base Controller class). I just wanted to get some opinions and find out how other people get around this. Thanks Simon
  4. Hi again, I can't believe I solved this only minutes after asking for help I simply added the below to the UrlManager 'register'=>'/user/register' And I thought I had to do something fancy Thanks Anyway
  5. Hi everyone, I'm going slightly beyond the scope of part 1 of this book. I want to create my own routes, an example being. Instead of /user/register, I want to use just /register. I thought i could just modify the URL Manager config and add something like this: '<action:\w+>'=>'<controller>/<action>', This wouldn't have been an ideal solution anyway incase of duplicate action names. Does anyone have a solution to this. Some kind of override. Thank you.
  6. Hi Lou, What Edward is saying is correct, the reason the 2nd, 3rd, 4th etc, errors are appearing below the footer, is because the 1st error is showing the header then the error then the footer. The 2nd error is then display just the error below the footer and not showing the header and footer again because you are using require_once(). The solution: remove all includes/requires from the error handler and let the core of your site handle these includes. Am I correct in assuming that you're worried that if there is an error before the header has been loaded you will get an ugly looking error message with no styling? You shouldn't worry about this to much as any system files you modify should be heavily tested before publish to a production environment. However if it does really bug you, you could store the errors in an array and then once the header has been loaded loop over them and print them to screen. Do this you will need to check the header hasn't already been loaded because if it has you would need to show the errors instantly. Regards
  7. Hi, Hmm, do you mean as in a class that will store the object and the misc data around it? That could be the correct approach, I hate how sometimes programming strictly can make a task so long winded and convoluted. Thanks for you views. Simon
  8. Hi all, I used these forum long ago and I can no longer remember my login creds..... anyway this question isn't really about this book, but I felt it would go best in the "Quickpro" arena. I'm wondering how you MVC users approach data handling. I'll create a simple scenario - 3 Tables (a, b and c) - Table a joins to table b which joins to table c - I have a query which selects all "a" rows and how many "b" and "c" rows match each "a" row. I steering clear of any ORM's for now and I'm using ->fetchObject in PDO mapping the data to the "a" model. The Problem The "a" model doesn't have an attribute for "total b rows" or "total c rows", is it ok by MVC law to store this data in the "a" object or should it be stored somewhere else, if so where? Thanks for reading and hopefully replying Simon
×
×
  • Create New...