Jump to content

requinix

Administrators
  • Posts

    15,227
  • Joined

  • Last visited

  • Days Won

    427

Everything posted by requinix

  1. There's also Options +MultiViews which allows you to omit extensions for any known (by Apache) file type.
  2. $variable = file_get_contents("link");
  3. But... it's a list. You don't just remove commas because the list spans multiple lines. There isn't really any good way to do it. You'd have to know in your PHP where the line break is going to be but that depends on fonts and sizes and widths and all manners of things which you can't really know for sure about.
  4. Doesn't matter. Users are users and they're all out to screw with you. Disgruntled employees, for instance. Anyways, 'uploads/image/$company' Variables don't work in single-quoted strings.
  5. You should never allow a user to determine where a file goes. All that "personalization" stuff should be handled with a database and URL rewriting. Store the file in a random place that's not normally accessible. Like in a folder not under the web root, or in one but locked down with a .htaccess. Then you use URL rewriting to route any appropriate URLs (like "/uploads/image/$company/$file") through a PHP script. That script queries your database according to the $company and $file for the actual image file to show, which it then does.
  6. Implode on a ", " (comma + space) instead. Or if you really don't want that, try a comma + a zero-width space.
  7. Not really. You could express it as a date range with if($date >= "07-02" && $date or an array if you wanted to stick in a whole bunch of dates [code=php:0]if(in_array($date, array("07-02", "07-03", "07-04"))){
  8. Also, look at the syntax highlighting for the first block of code you posted. Does that seem right? You have a problem with your quoting.
  9. Take a look at what other information is available in $matches.
  10. I don't remember what it's actually called but use that one operator that selects only immediate children. ul > li > a
  11. Your onclick passes numbers to votYes() but the function itself is expecting some kind of objects (presumably textboxes).
  12. The hard part is mysql_query("UPDATE pw_users SET Nickname='" . mysql_real_escape_string(???) . "' WHERE Username='" . mysql_real_escape_string(???) . "'"); The rest you can find with some creative Googling.
  13. Speaking as someone who's implemented CIM within the last month, the documentation is pretty good but does have some flaws. Found a few typos here and there and the descriptions of some parts are a little vague. Only a couple statements were actually flat-out wrong. Doesn't talk about some of the weird edge cases but I could find most answers elsewhere on the Internet (and the couple others through testing). Skimming through AIM's docs I expect it to be about the same story. Haven't seen anything for the other APIs.
  14. Use an array: print_r($_POST['check']);
  15. Not really - I don't learn with books or tutorials. Any series you've tried before and liked? Head First? O'Reilly? Mosey on over to a bookstore, skim through a few books they have, and see what's out there. There's bound to be one or two that will work well for you.
  16. I gave you link with the expectation that you would click it and read the page you were brought to.
  17. Rather than deal with ASCII numbers, how about a plain and simple $string = "etd00"; $condition = (/* strlen($string) >= 2 && */ $string[0] >= 'A' && $string[0] = 'A' && $string[1]
  18. You can pass it as an argument to simplexml_load_string.
  19. As with pretty much everything, it depends. Spend a minute thinking about IP addresses, hostnames, and what you want to do with them, and decide whether you actually need to store the hostname ahead of time or whether you can put off looking it up until you need it later (if you do). IMO the IP address is enough. I'd only store the hostname if you wanted to do a search on it. Like a wildcard search could be interesting but only if you actually care about doing it.
  20. I say C first because it forces you to learn things from the ground up, but you don't have to become a professional with it - enough to, say, understand the PHP source code. C++ abstracts out some things that are actually important to know and understand. Things that not nearly enough programmers nowadays know about. Also, get off my lawn.
  21. Try with the LIBXML_PARSEHUGE option.
  22. Nooo... URL rewriting Rewrite /memberID URLs to a script, such as with a RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule .* script.php?memberID=$0 [L]
  23. I could see someone taking their "I have to do it with
  24. CGI dictates that the REMOTE_ADDR is always set. If it is not then either (a) it's not a CGI request, like through the command line or (b) whatever is invoking PHP isn't doing so according to standards.
×
×
  • 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.