Jump to content

requinix

Administrators
  • Posts

    15,242
  • Joined

  • Last visited

  • Days Won

    429

Everything posted by requinix

  1. You don't have to parse it yourself. SimpleXML will do that. If you don't know how to use it, check the manual for examples.
  2. First word is "AJAX". Second word is generally like "auto-populate" or "auto-generate" or something like that. But basically it's just AJAX. When the one list changes you do an AJAX request to find out what should go in the next list. (And then you put the items in there.)
  3. What are you counting? At (about) what rate does it normally increase?
  4. Look at where you put your parentheses. They aren't all in the right places. And you don't need to mysql_real_escape_string() a number. And you don't need to use quotes in the query if they're around numbers.
  5. Certainly possible. Start with SimpleXML.
  6. allow_url_include is unsafe and should never be used; allow_url_fopen is the "safe" one that should be enabled. Just to put that out there. Using something to automatically update (via FTP or whatever) is the best option, but it can take a while to set up a good system. Short of that, my suggestion is to "copy" the CMS for each client, but for the files that you want shared what you actually copy are a bunch of links* pointing back to the originals. Thus you can keep include()ing the same files. When you need to customize files you remove the links, copy the files, and make your changes. You need to make sure file permissions are set up on the originals so that anybody can read them - that could be the problem you have now. 0644 on regular files, 0755 on directories. * Symbolic. There's a chance that PHP will realize they're symbolic and take special actions (I don't know but I wouldn't expect it); those actions may screw up the whole idea, in which case you'd need hardlinks instead.
  7. What do you get if you print out $query?
  8. With PHP there are many, many ways of doing something. Narrow it down to the methods that actually work and are safe (feel free to ask for help on that part) then pick the one you like best.
  9. dirname() will only work in some of the situations. For example, it won't work with URLs like "/path/to/file.php?query_string". strtok(), or some similar method, will work on every URL.
  10. So update $nwhatever every time it gets adjusted in the database. That way you don't have to keep looking it up.
  11. bin2hex Spoiler: "octet" was the right term.
  12. Maybe a description of the problem you're having?
  13. Maybe all you want to do is round the number?
  14. Don't use gmdate() - just the regular date(). gmdate() formats time according to the GMT timezone. strtotime() parses time according to the current timezone. If they aren't the same then you might end up going backwards in time...
  15. Maybe. Does it do what you want? If not then what URL are you redirecting to what URL?
  16. $naqahdah = $naqahdah - $cost_homes;
  17. Use strtok on the REQUEST_URI: strtok($_SERVER["REQUEST_URI"], "?")
  18. 1. Does your server have mod_rewrite enabled? 2a. How do you know it doesn't work? Are admin.php and index.php not running at all, or are they not running correctly? 2b. Could it be that admin.php wants the page name without the "a/" path?
  19. To keep the original httpd.conf as "clean" as possible, create another .conf file for settings that you add. Near the end of httpd.conf is a bunch of Include directives: put another one at the end for your new .conf. Inside that new file put the ProxyPass I posted, then reload/restart Apache.
  20. Just use INI files and parse_ini_file. Don't do any PHP-code nonsense when there's a much simpler solution that's actually geared towards this exact use case anyways.
  21. RewriteConds and (a single) RewriteRule go together as a set. If you want a more specific rule than "everything goes through index.php" then add another set of Conds+Rule before the generic rule.
  22. GIMP can't open websites. Your question doesn't make sense.
  23. SELECT 1 FROM pm WHERE id = user ID AND read = "unread" LIMIT 1 If you get any rows back at all then there is at least one unread message.
  24. The arrays wouldn't be empty - there would be no arrays at all. $lat and $long are only defined if the loop runs, and if there aren't any matching $ids in the database then the loop will not run...
  25. 1. That's hashing, not encryption. 2. Actually it would hash "1234password1234". Remove the ",0" in the second call to substr() to fix that.
×
×
  • 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.