Jump to content

Daniel0

Staff Alumni
  • Posts

    11,885
  • Joined

  • Last visited

Everything posted by Daniel0

  1. Try this: <?php $xml = SimpleXML($data); $authors = $xml->xpath('AuthorList/Author'); foreach($authors as $author) { echo "{$author->ForeName} {$author->LastName}\n"; } ?>
  2. What LemonInflux asked about was a method called _shutdown() (1 underscore). When you're prepending class properties or methods with a single underscore it's signifying that the member is to be considered private or protected. This is a convention used for pre-PHP5 scripts as versions before that did not support member visibility. The ones with two underscores are called magic methods.
  3. How can't you get into your CP? Are you getting any errors when you try to do so?
  4. Post an example of an exception which is not caught by that... I'd like to see that.
  5. Ah, well just check the size of the file and compare it with the expected file size. filesize() strlen()
  6. My guess is that the value is being set at compile-time and therefore the variables are not set yet.
  7. Try this: SELECT blue.*, ( SELECT SUM(l.rating) FROM late AS l WHERE l.lid = blue.id ) AS rating FROM blue ORDER BY rating DESC LIMIT 10;
  8. You're missing a doctype, an html element and a body element. You can validate your markup here: http://validator.w3.org/
  9. Which errors are you getting?
  10. $_POST['from'] (or whatever name you choose for the field)
  11. Did you add either single or double quotes around the strings? If you did, then the code should work as expected.
  12. Change print "Today is Sunday": to print "Today is Sunday"; (semi-colon instead of colon). It'll also have to be e.g. 'Sunday' instead of Sunday.
  13. Yes, providing that's where you came from before you got to the login form.
  14. Could you post a link to it?
  15. What's a fully written file versus an incomplete file?
  16. Ah, yes of course. That would make sense seeing as that's the page the form is submitted from. You could, on the login page (login.php), store a hidden field called from or whatever if the referrer is the checkout page. Then you could on the login form processing page check if from is set and in that case redirect to that page.
  17. I don't think you can initialize class properties like that. You could just set it in the constructor though.
  18. Try to output $_SERVER['HTTP_REFERER'] to see what it actually contains. That'll give you an idea of what you need to change the if statement to.
  19. That would work the same way, but then you need to make sure that all subdomains are handled by the same vhost.
  20. You cannot do that. Late static binding is not supported yet. It's coming in PHP 5.3.0. http://php.net/manual/en/language.oop5.late-static-bindings.php Edit: It seems there is a comment on the bottom suggesting that you can use get_class() to get around that. You might want to check that out.
  21. Well, if it returns an array then it should work in a foreach loop. Try to print_r() the array it returns and post the output here (if it's large, cut out some of it).
  22. Try here: http://developer.mozilla.org/en/docs/Extensions
  23. It's a built-in function: http://php.net/json_decode
  24. It seems like it's returning JSON. You can use json_decode() to turn it into an array.
  25. private SMSEventInput $smsEventInput; You cannot do that. It has to be private $smsEventInput; The same goes for all similar lines.
×
×
  • 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.