Jump to content

trq

Staff Alumni
  • Posts

    30,999
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by trq

  1. With the layout you have you should tell composer that you are using psr-0. Then, as long as you are using namespaces that coincide with your directory structure your classes will be autoloaded.
  2. <?php error_reporting(E_ALL); init_set('display_errors', 1); Sorry, Ive lost my crystal ball.
  3. Your question is as clear as mud.
  4. What is it that you are actually trying to do?
  5. PDO is not a database abstraction. It provides you the same API across databases, but it does nothing to protected you against differences in syntax between those systems. For that you would need to use something like Doctrine's DBAL on top of PDO.
  6. You do realise what you are doing is opening a huge security hole? Your basically allowing anyone to inject content directly into your page.
  7. Given a class called Foo within the file /lib/Foo.php spl_autoload_register(function ($class) { include '/lib/' . $class . '.php'; }); $foo = new Foo;
  8. I wouldn't bother creating your own autoloader, composer comes with one built in, just use that. On a side note, autoloading has nothing to do with creating objects from classes.
  9. Do you have a specific question?
  10. There's nothing you can do in Perl, Ruby or Python that you can't do in PHP, however, some of these languages do already have certain specific tools writen in them that can come in very handy when developing PHP. For instance, Vagrant (a tool for managing development environments) is written in Ruby. Provisioning tools such as Chef and Puppet are written in Ruby while Salt is written is Python. Capistrano (a deployment tool) is written in Ruby, though there are also deployment tools such as Rocketeer written in PHP. Basically, learning another language is never going to harm you. A decent dev should have at least a handful of languages under there belt IMO.
  11. You viewFriendIfExistOnTbl function does nothing to check if two users are friends. It just checks to see if the current user has any record in the friend table.
  12. You seem to have a function within a function. That will not work as expected. If you trying to do method chaining, your need to have your methods that wouldn't normally return any useful result return an instance of the current object.
  13. You cannot call header after outputting content to the response stream. Simple. Arrange your code so that you are not doing that and these errors go away.
  14. You need to clarify exactly what this means. Where did you install a nameserver?
  15. Assuming the DNS is managed by a different machine I don't see how it could possibly be the machine your pointing to.
  16. Where? Drupal is written in PHP but you don't necessarily need it to add content.
  17. I just don't see the point to be honest. The beauty of "web" apps is they are maintained in a single location. SaaS is here to stay, it's becoming more and more popular for good reason.
  18. After having a quick look at your code, I say find a framework. Your code isn't great, but you know more than the basics, you just need some steering in the right direction in regards to patterns etc. A framework will teach you a lot about how to structure things it's way. Once you have mastered doing it there way, you can then start to break out (with the experience you have gained) and do things your way again.
  19. trq

    help in php

    And your question is?
  20. I meant the api provider. If you don't know what it is, i'm not sure who would. What do the logs say about these requests?
  21. The error is pretty self explanatory, your haven't defined $query anywhere before you use it.
  22. Php comes with a web server built in. Still though, I'm not sure "client side" apps is a great domain to be using php in. I meen, you'd need to take care of the installation and maintenance of php and all then.
  23. I would suggest you contact the provider, something weird is going on there.
×
×
  • 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.