Jump to content

trq

Staff Alumni
  • Posts

    30,999
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by trq

  1. There is nothing inherently unsafe about it, in fact, its a very common approach. The only real improvement might be to use mod_rewrite and a slug for your url.
  2. I know right... I'm not sure how these projects are kept alive. Just for shits and giggles I have just had a quick look at CakePHP's upcoming 3.0. Starting at the composer file - the first sign that things aren't good. The framework isn't built from loosely coupled components. I've then browsed the "Core" namespace just for fun. My eyes hurt.
  3. I'm not sure how Cake "plugins" are designed, but any code installed via composer will be installed into the vendor directory and autoloaded. Would cake plugins support being installed here? Not necessarily. Composer supports multiple autoloading strategies including psr-0, psr-4 and class mapping.
  4. Do you have a question?
  5. Their website say that 3.0.0-alpha1 was only released at the end, so it's in alpha. I wouldn't use anything alpha for anything I thought was going into production, but its there to play with.
  6. CodeIgnitor will teach you nothing.
  7. Slim is probably as simple as its going to get for the sort of thing.
  8. mod_rewrite isn't capable of hiding multiple pages behind a single url.
  9. As long as this registry is injected via __constructs I don't see it as such a bad thing. It is basically a IoC container in that case. Just make sure that you are type hinting to a well defined interface for this Registry. The registry pattern has the potential to cause issue when you make it a singleton that has a static getInstance() method or similar.
  10. json is a data format, there is nothing to install. http://json.org
  11. That is seriously some of the worst code I've seen in a while. Could you try to make it any less efficient?
  12. The first question I have is, these "websites", are they all going to be hosted on a single machine? If so, why is the admin panel going to be hosted separately? I would be possible to create a CMS that could handle multiple websites which is essentially what you're asking. Not a simple task, but its very doable given the right timeframe and resources. Rest is a "type" of api, while crud is basically an interface to the database. I would be tempted to go down the api route but it would be a lot more work than creating a cms allowing crud. Really? I'm not sure that is a question that can be answered in a simple post. A single database will suffice. Completely depends on your skillset and the tools that you are comfortable using. I just finished a project where I created a completely custom, fairly feature rich CMS for a client in around 5 weeks from scratch. With the right tools, anything is possible.
  13. Just create (or edit the current) vhost. http://httpd.apache.org/docs/2.2/vhosts/examples.html
  14. That is indeed normal, so that warning is not related at all to the code you have posted. The code you have posted also cannot possibly only iterate once if $nrows is 2. How can you be certain $nrows is equal to 2 ?
  15. You have a bunch of errors in your code. 1) Your "or die()" error message relates to a database connection failing, if mysql_query returns false it has nothing to do with your connection here. 2) mysql_* has been deprecated and should no longer be used. 3) Numeric string need to be quoted in php. eg; $record[jaaIndex] should be $record['jaaIndex'] Now as for your issue. Have you taken any notice at all of the warning that is being produced? What does is the value of $result?
  16. So, if you want multiple categories, $get_categories needs to be an array.
  17. It would be more helpful to see some relevant code.
  18. Not really, it was a long time ago and I have never given it a second look. The first thing I remember though was simply it's coding standards, its ugly, I remember that. I also remember it going against a lot of the design principles I had learnt through working with Python. God like "core" objects, static methods scattered throughout, zero testing and an Active Record based ORM. Better frameworks already existed for PHP at the time, Codeignitor was not doing anything ground breaking or improving on this. See above. People with little experience with OOP and good design principles Because it has since taught a lot of its users bad design. You can still see some of these tendencies in other popular frameworks. A lot of CI people have been drawn to Laravel for instance because they see the Facades as providing them with the same Static interface they've grown to love (all be it a lot better implemented under the hood). I'm sure you can find plenty of articles on the subject. I've never liked CI. Those that use it may be in a bit of a bubble but it's always been that way from my view. I understand that people who can simply ignore the bad design or people who are blissfully unaware of it "can get shit done". Much like how a lot of people can "get shit done" with platforms such as Wordpress. Truth be known, there is a lot of bad PHP code around that enables people to "get shit done", still, this doesn't change the fact that it is crap code.
  19. If its all hosted on the one server why use multiple installs in the first place? Your application should be built to handle multiple tenancy. 1 & 2) There are plenty of deployment tools around. Personally I use capifony which is capistrano tuned for Symfony applications. 3) Most SaaS services auto update without the user being aware.
  20. I'm not sure how many valid opinions you're going to get around here. I for one have never and would have never even considered using CI. As far as I am concerned the project can't die soon enough. I understand it was popular amongst a certain crowd of developers, and I understand that for a lot of instances it has filled a need. I also believe however that overall it has probably done more harm than good to the php landscape. An "Abomination" is the latest term I've been using to describe it. The sooner it is gone, the better IMO.
  21. This syntax defines a default argument. Meaning, if you pass no argument to the myFunction function, $myVariable will be an empty array. See http://php.net/manual/en/functions.arguments.php
  22. Read here: http://www.catb.org/esr/faqs/smart-questions.html
  23. You question is far too vague and covers far too much scope. Go away and think about your actual issue, breaking it into smaller parts. Come back when you have an actual question.
×
×
  • 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.