Jump to content

salathe

Staff Alumni
  • Posts

    1,832
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by salathe

  1. You can do whatever you like after catching the exception thrown from spl_autoload. Dieing with the exception message, as in my code above, was just an example -- you're free to do whatever you like at that point.
  2. You can use exception handling to report the error. For example (to be used as a guideline, not a fully working and useful script): try { // Try to load class Example spl_autoload('Example'); // Do something with Example // ... } catch (LogicException $e) { // The class could not be loaded, exit with an error message die("Error: " . $e->getMessage()); }
  3. To put it bluntly, don't use relative paths. (I could explain at length that that is the solution, with pretty examples and such but it wouldn't really say anything other than that.)
  4. There are very, very few active moderators on the site. Please (continue to) be patient. In the mean time....
  5. Works fine for me: <?php $data[5] = 'IC'; if ( ! preg_match("/^[ABCDEIMSw4]{2,7}$/", $data[5])){ echo "INVALID "; } else { echo "VALID"; } ?>
  6. Define "pad", if you want to just add that character then why not $string = "|$string|"; ?
  7. There's no reason you should let this get to you, just say "no" and move along to someone else.
  8. If you're using the mysql_* family of functions, have a stab at mysql_insert_id.
  9. I hope the OP still wants to be a web developer after the idiocy in this thread.
  10. Check the configuration of the two servers for differences, particularly the output buffer configuration.
  11. It needs one after the end of $content = "<?php \n" as well.
  12. It would help if you detailed what you're searching through (just file names, file contents?), and what you're searching for (file names containing blah, files containing blah?).
  13. 7 [ot]Seriously though, probably higher than you need to worry about and if it does become a problem then you'll know about it.[/ot]
  14. No worries, good to see this particular question get sorted and you know where I am for any more.
  15. Perhaps you could instead just use $thumbnailer = dirname($path) . '/THUMBS/' . $pic_name If you need any more help with the DirectoryIterator feel free to ask, I literally wrote the manual for it.
  16. It's not clear (to me) what you're asking. What precisely are you wanting to do?
  17. inversesoft123, is there any reason you decided to mention using preg_split over your earlier suggestion of strlen/utf8_decode?
  18. So does PHP, what's your point? (If the point was just that it has the stigma, fair enough.) Not entirely correct, ActionScript is one of a number of dialects of ECMAScript: another is JavaScript.
  19. Start here: http://www.google.com/analytics/ Yes there is "an API for this".
  20. Please share your solution for anyone else who might reach this topic searching for a similar thing.
  21. "Nothing happened!" is not much use to anyone. What does your logging say?
  22. Hi eekeek, welcome to PHPFreaks. Very nice to meet you and great to see you're pushing ahead with learning about web development! Hope to see you around.
  23. Remove the single quotes (') from your filter.
  24. Ahh, the Answer is a new XML document embedded within the main one. You'll need to create a new SimpleXML object with that Answer text.
×
×
  • 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.