Jump to content

Daniel0

Staff Alumni
  • Posts

    11,885
  • Joined

  • Last visited

Everything posted by Daniel0

  1. Alternately you could use strtotime() to make a formatted date into a UNIX timestamp and then use date() to format it accordingly to your needs.
  2. mysql_data_seek($result_resource, 0);
  3. Then just use single quotes. In that way they won't be interpolated (i.e. the variables will not be replaced with their values).
  4. I think you'll have to elaborate on this feature vBulletin (I assume it's that one) has. It's commercial, closed-source software, so most people will not have access to see exactly what you mean (at least not legally). Anyways, it does obviously have something to do with parsing of XML files, so I'll use the opportunity to advertise my latest tutorial on PHP Freaks: http://www.phpfreaks.com/tutorials/155/0.php
  5. I'm not sure if it's possible, but you could try to set the default to NOW(). Otherwise explicitly make the date that.
  6. That is how it will work as long as you use double quotes.
  7. You might want to check the following php.ini directives: upload_max_filesize post_max_size max_input_time
  8. What directives did you change (especially anything regarding permissions on folders) after installing?
  9. You need to ensure that nothing (even a small space somewhere) has been output before session_start() is called.
  10. Using PHP would only make sense if you are going to have any dynamic content. It is possible to keep the same URL and the difficulty of the "conversion" depends on what kind of features you plan to implement on your website.
  11. http://www.multimedia-technologies.com/clientsites/combscourtreporting/images/courtreporting.jpg has some compression artifacts. You might also want to apply outline: none; to some of the image based links to remove the dotted border which is created around them when you click on them in FF.
  12. Instead of creating a lot of singletons you might want to make a registry instead. I believe the resources topic in the app design forum has some links regarding that. Otherwise you could just google it. You should still try to pass an object as an argument if possible though.
  13. TMTOWTDI?
  14. That will result in an E_WARNING. I see what you're trying to do though, but it won't work if the item is the first or last.
  15. I'd say it depends on how closely those two words are related. In your example I'd make it a single keyword.
  16. Well, I just misplaced a ). Another time though, please state how "it isn't working". <?php $string = 'PD32TR/PD54YT/PD43QW/512RE/51QW/PD43WQ'; $parts = explode('/', $string); foreach($parts as $key => $part) { if(substr($part, 0, 2) != 'PD') $parts[$key] = 'PD' . $parts[$key]; } $string = join('/', $parts); echo $string; // output: PD32TR/PD54YT/PD43QW/PD512RE/PD51QW/PD43WQ ?>
  17. Try something like this: $parts = explode('/', $string); foreach($parts as $key => $part) { if(substr($part), 0, 2 != 'PD') $parts[$key] = 'PD' . $parts[$key]; } $string = join('/', $parts);
  18. If you want to learn OOP then I'd suggest Zend Framework to CodeIgnitor as you'll handle more things yourself thus dealing more directly with the classes yourself. Still, ZF probably has a higher learning curve than CI does, so for a beginner CI may be easier to comprehend. Something to read is the OOP section of the manual as well as some of the things in this topic.
  19. By not having a space in the filename? You shouldn't refer to the filename in the URL though, but rather as an ID which you can then get the path of using a database of some sort.
  20. http://www.phpfreaks.com/forums/index.php/topic,95433.0.html
  21. Windows has batch scripting. You can also choose to just use PHP, Perl, Python, Ruby or another interpreted language which can be run from the command line.
  22. I think that people who do not think that extensive use of OOP in programs would be useful does not have sufficient knowledge about it.
  23. In my opinion what you're trying to do is pointless. I assure you, however you try to restrict me from viewing the HTML I will always be able to get it. It is being stored on my computer and rendered by my browser after all.
  24. That's just because " is encoded to %20. Example: http://www.google.com/search?q=%22test%22 is a search on Google for "test".
  25. Duh... of course you can't make a Flash application in C. Flash isn't even a language. The language used in Flash applications is called ActionScript.
×
×
  • 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.