Jump to content

Daniel0

Staff Alumni
  • Posts

    11,885
  • Joined

  • Last visited

Everything posted by Daniel0

  1. You will have to take that up with Eric or purchase donator subscription. He is the one who wanted ads within posts and he supersedes my (and the other administrators') authority. For discussions about the ads you may use the existing topic.
  2. Kind of old topic to bump to make a point...
  3. I agree with the above two posts. Eric usually do not interfere with forum/site administration. The only thing he takes care of are the financial things.
  4. No, I'm just Daniel. This is Eric.
  5. Heh... Good point. I'll send Eric an email about that.
  6. Meaning that ok may be in a different timezone than you are.
  7. Has it ever occurred to you that we have users from all over the world?
  8. We need to get one of them forums with built-in social networking features
  9. Due to high costs of keeping this site online it has been decided to put advertisements on the forums. If you wish to hide the ads, please consider donating instead of using ad blocking tools, as all advertisements will be hidden for people in the PHP Freaks Donator group. Advertisements have not yet been added to the main site, but they will follow shortly. Main site announcement
  10. It's behaving as expected. tags highlight PHP code. For general code you may use the [code] tags.
  11. Noobs. Everybody knows that you do not run beta software on production environments.
  12. Then you have to go to a court where he is. Your best bet would probably be to contact his ISP and request that his subscription be terminated.
  13. If you can prove who it is and if that person is either in the same country as you are, or in a country where the government is willing to deliver the person to your country's authorities, then yes, you can.
  14. I suppose that evidence that has been gathered illegally will be invalid in a court of law, so it would be pretty stupid to illegally search something.
  15. You mean like in a blob? You're better off storing the image on the disk and reading it from there. It'll put less strain on the database server.
  16. Yes, specify the path to the file on the disk. Or generate the thumbnail yourself.
  17. The default chmod depends on the umask. On my VPS the umask is 022, meaning that "write" (=2) will not be set for "group" and "other". This essentially means the default is 644 for files and 755 for dirs because the full access mode is 666 and 777 for files and dirs, respectively. If you care, then it's full & ~umask that'll be the default.
  18. Yeah it sounds like permission problems. Try to chmod the upload dir recursively to allow write permissions for the httpd.
  19. No problem. Remember to click the "Topic Solved" button when you're done. I did it for you this time though
  20. Hmm... interesting. This will do it if I understand you correctly: <?php $strings = $cp = array( 'This is line number 1', 'This is colour green', 'This is a silly example', ); uasort($cp, create_function('$a,$b', 'return strlen($a) > strlen($b) ? 1 : -1;')); $max = strlen(array_shift($cp)); unset($cp); $common = null; $pos = 0; for ($i = 0; $i < $max; $i++) { foreach ($strings as $s) { if (!isset($c)) { $c = substr($s, $i, 1); } else { if ($c !== substr($s, $i, 1)) { break 2; } } } $common .= $c; unset($c); $pos = $i; } if (strlen($common) > 0) { echo '<label for="foo">' . trim($common) . '…</label>' . PHP_EOL . '<select name="foo" id="foo">' . PHP_EOL; foreach ($strings as $index => $string) { echo "\t" . '<option option="' . $index . '">… ' . trim(substr($string, $pos)) . '</option>' . PHP_EOL; } echo '</select>'; } else { echo 'The strings do not share any common starting data...'; } ?> Output: <label for="foo">This is…</label> <select name="foo" id="foo"> <option option="0">… line number 1</option> <option option="1">… colour green</option> <option option="2">… a silly example</option> </select>
  21. Try $this->update(array('lft'=> new Zend_Db_Expr('lft + 2')), 'lft > ' . $lft); Which class does $this refer to here?
  22. Try something like this: if ($this->getRequest()->isPost() && $form->isValid($_POST)) { if (!$form->picture->receive()) { throw new Zend_Exception('The picture could not be uploaded.'); } else { Zend_Debug::dump($form->getValues()); } } Also, setAttrib('enctype', 'multipart/form-data') should be done on the form, not the element.
  23. Duh... yes there is: "Teach Yourself X in 24 Hours" Really though, don't waste your money on such books.
  24. You may want to read this: http://www.phpfreaks.com/tutorial/php-security
×
×
  • 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.