Jump to content

scootstah

Staff Alumni
  • Posts

    3,858
  • Joined

  • Last visited

  • Days Won

    29

Everything posted by scootstah

  1. You don't need to write the absolute path, just write it relative to the file saving it. And make sure you have permission to create files in that directory.
  2. Simply put, it's not possible.
  3. if (preg_match( '/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/', $domain)) { This what you want?
  4. You still haven't asked a question. We can't tell you what is wrong with a script when you aren't telling us the symptoms. Plus, you haven't posted relevant code...we don't know what a "multi-site-phone-reboot script" is. So... What is the script doing or not doing that is undesired?
  5. You can create bookmarklets, or save greasemonkey scripts on Firefox.
  6. You are missing single quotes around some of your variables.
  7. Loop through it, and do if (preg_match('/.php$|.html$/', $file)) {
  8. Are you talking about just a normal website? That sounds like a very odd approach. Just do the normal and set a last_active flag for your SESSION. If it is, say, 10 minutes old without being updated then mark them as offline.
  9. This is how I usually debug things... // if.... echo 'here'; // k that works // if........ echo 'here'; // k that works // if....... echo 'here'; // nope, WTF?!
  10. What do you mean?
  11. You marked this solved, so does that mean you got it to work?
  12. If you're already using jQuery, you might as well just get Uploadify and make this super easy on yourself.
  13. Like I said, what is post_max_size set to in the php.ini? And how big are the files you are trying to upload?
  14. $files = array(); foreach (glob("*.txt") as $filename) { $files[] = $filename; } Like that? If you want to count it just do echo count($files);
  15. Yes. Take a look at these : http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html
  16. This is true if upload_max_filesize is exceeded, but if post_max_size is exceeded then $_POST and $_FILES will be empty.
  17. Thanks! i tested my code and your code, and i will add the $ sign. i thought the ",3" i put at the end of the code told it to look at the last 3 characters. No, that "3" is the limit on how many times preg_replace will replace something. In the first pattern, to underline the first e, if we didn't have the "1" there it would replace ALL e's. It's not needed for the second pattern, but it's still needed if you combine them.
  18. Read: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_date-add
  19. Are you exceeding the "post_max_size" setting in the php.ini? How big of a file are you trying to upload?
  20. Actually, your pattern for matching son wouldn't work. You'd have to change it a little, like this: <?php echo preg_replace('/son$/', '<i>son</i>', $fname); ?> By using the $, we tell it to only look at the end of the string. And yes, you can combine them like so: $str = 'underline the first e and italics son'; $str preg_replace( array('/e/', '/son$/'), array('<u>e</u>', '<i>son</i>'), $str, 1);
  21. You know, if the date is stored in a MySQL time/date format, then you can use DATE_ADD in a WHERE clause to update the table if 1 minute has passed. Makes this a lot easier.
  22. Did you use enctype="multipart/form-data" in your <form> tag?
  23. Well then I offer my apologies; I misinterpreted you.
  24. Working example here: http://jsfiddle.net/8dG9N/
  25. Because this isn't called a "lecture", it is called a "forum" where people exchange ideas... I said I don't know or want to learn OOP right now, so deal with it. Go fight with someone else. Honestly. Debbie You come off as arrogant when you say things like: You also suggest that my solution is the "mark of a junior coder".
×
×
  • 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.