Jump to content

trq

Staff Alumni
  • Posts

    30,999
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by trq

  1. Yeah a registry will work. It's akin to using globals however. You should look into 'dependency injection'.
  2. Ah... so, much like myself you would rather do the programming side of things than the markup. This is what I do for a living. Very rarely do I have to deal with design or markup though I also do a fair amount of client side JavaScript programming. You will find that most PHP developer positions expect you to be a jack of all trades, however, there are spots around that are purely for a PHP server-side dev. There just not as common and generally with larger firms.
  3. There is a program called diff that can display the difference between two files or directories or even an entire directory structure. You can use the output of this diff program to create patch files. You can then use a patch file to apply these changes to code. Example. old/foo.php <?php echo "hello world"; new/foo.php <?php echo "Hello World"; Creating a patch: diff -rupN old/ new/ > foo.patch foo.patch diff -rupN old/foo.php new/foo.php --- old/foo.php 2011-08-15 11:10:14.000000000 +1000 +++ new/foo.php 2011-08-15 11:10:43.000000000 +1000 @@ -1,3 +1,3 @@ <?php -echo "hello world"; +echo "Hello World"; The - at the start of aline indicates that that line has been removed, while the + indicates that that line has been added. To apply a patch you use the patch command: cd old/; patch -p1 < ../foo.patch Now, if you look at old/foo.php <?php echo "Hello World"; Patching can be even easier these days of your project uses Git for version control. Git has it's own mechanism for creating and applying patches.
  4. This topic has been moved to mod_rewrite. http://www.phpfreaks.com/forums/index.php?topic=341473.0
  5. In order to efficiently sort alphabetically, you would need to store the street separately from the street number.
  6. You should have a look at the flowplayer manual. It's been a long while since Ive used it but, there are better ways to do this.
  7. This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=341470.0
  8. What do you mean it doesn't let you trigger it?
  9. array_pop(explode("/", $id));
  10. $(function() { $('.simpledialog').click(function() { $('#box').fadeIn(250).fadeTo(0.5); } });
  11. I would suggest that who ever told you that didn't know what they where talking about. Selectors are much better as they help separate your code from your markup.
  12. Considering you appear to be using jQuery anyway you should learn how to use it's selectors and avoid placing onClick events in your markup all together.
  13. I'm not sure you understand. Hashes are used for client side code. They are not actually sent to the server as part of the request. So, the url you posted in your first post makes no sense in relation to server side operations.
  14. Of course. The variable $session won't be in scope. You'll need to either pass them in, or have the code that depends upon the MySql, Online and Session objects to instantiate them itself.
  15. Why is the hash in there in the first place? Anything after a hash is normally for use client side.
  16. Methods (like functions) require braces(). What you are looking at is a property called load. This property is set to some other object which in turn has a method called library.
  17. I'm really not sure what you mean by this. Once a file has been required, it's functions / classes are available anywhere.
  18. This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=341460.0
  19. If you don't want to make web pages what are you planning on using php for?
  20. Then all you need to do is make php produce the same.
  21. This topic has been moved to HTML Help. http://www.phpfreaks.com/forums/index.php?topic=341452.0
×
×
  • 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.