Jump to content

trq

Staff Alumni
  • Posts

    30,999
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by trq

  1. Most open source software in the PHP world is (unfortunately) not too well written. Also, a lot of it pre dates some of the more prominent frameworks.
  2. I'm not sure. It's probably the most popular version control system getting around though, so I would asume so.
  3. Better yet, use Git. http://git-scm.com/
  4. I'm not sure what gave you that impression. The @ symbol simply suppreses errors. The op needs to wrap there while loop in a check that makes sure that $handle is indeed a resource. if ($handle = fopen($file,"r")) { // while loop in here }
  5. If it's easy and obvious show us your code.
  6. As an example, select records where the month is June: SELECT fld FROM tbl WHERE MONTH(some_date_fld) = '6';
  7. Variables are not interpolated within single quoted strings.
  8. trq

    php.ini

    The code you have showed us will not produce the error you have shown us. Fix your code. If you can't, post the problematic code. Turning error reporting off because you have errors is the sign of a poor programmer.
  9. To the contrary, using a framework can often make a site easier to maintain. All the developer needs to know is how to use said framework and providing the original programmer has done things as they are generally (best practice) done, any developer with an understanding of said framework should have no trouble picking up where the original programmer left off.
  10. This topic has been moved to mod_rewrite. http://www.phpfreaks.com/forums/index.php?topic=360814.0
  11. These are simple syntax errors, you need to learn to fix them yourself. echo str_replace(array('<h3>', '</h3>'), array('<h1>', '</h1>'), ob_get_clean());
  12. Missing ; on ob_start()
  13. You would need to replace: <?php include('file.txt'); ?> With: <?php ob_start() include('file.txt'); echo str_replace(array('<h3>', '</h3>'), array('<h1>', '</h1>', ob_get_clean()); ?> This puts the contents of the call to include within a buffer that you can then manipulate using whatever functions you like.
  14. Firstly, your question is a little confusing. Your topic mentions php, yet you have posted in the "Other Programming Languages" board. Are you using PHP? Secondly, where exactly are you stuck?
  15. Your dead right about this question being hard to answer based on the fact that there are a lot of different factors involved. From someone that has been developing (mostly backend stuff) for a long time both as a freelancing and as an employee, I'm going to put it this way. If I wanted to get a freelance business (and portfolio) off the ground quickly, Wordpress would definitely be the first application I turned to. It is extremely easy to get things done, and it works very well. Having siad that however, from a developers perspective, I would hate to have to work with it every day. It is (IMO) poorly written and suffers numerous floors in it's approach. My biggest gripe? Globals. They are fucking everywhere. As such, you need to take a great deal of care when writing code for WP. Given the time, I would much prefer to build a CMS on top of a decent framework myself. Of course, this isn't something to take lightly however. I would expect such a CMS to probably eat up the best part of a year in development. For someone trying to start a business, this kind of time investment often doesn't seem viable. So yeah, I guess in summary I would say this. If I wanted to get the ball rolling on my business quickly, I'd go worth Wordpress, If I was planning on being in business for a long time, I would likely spend the time up front to develop a system that I myself was happy with.
  16. spl does nothing of the sort. it's up to *you* to write your autoloading mechanism. The spl_autoloader is just there to help you register that mechanism.
  17. I haven't tested it, but I would figure that guess-timation would be incorrect. Databases are made for storing and retrieving data fast.
  18. The first question I have to ask is why do you need the xml file? From your description, it seems an unnecessary step in the process.
  19. spl_autoload_register expects a function that will be used to resolve your class name to a file to include. Your not passing it anything.
  20. This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=360688.0
  21. This topic has been moved to PHP Regex. http://www.phpfreaks.com/forums/index.php?topic=360686.0
  22. Like all data that is output to the browser however it also posses a potential xss threat.
  23. Your function will fail if nothing is passed in as the first argument so yeah, there is not likely any need to check to see if it's null.
  24. This topic has been moved to Application Design. http://www.phpfreaks.com/forums/index.php?topic=360682.0
  25. The errors are pretty self explanatory. What part exactly are you having trouble with?
×
×
  • 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.