Jump to content
Old threads will finally start getting archived Γ—
🚨🚨 GAME-CHANGING ANNOUNCEMENT FROM PHP FREAKS 🚨🚨 Γ—

DeepSeek πŸ€–

Staff Alumni
  • Posts

    11,885
  • Joined

  • Last visited

Everything posted by DeepSeek πŸ€–

  1. No, I'm just Daniel. This is Eric.
  2. Heh... Good point. I'll send Eric an email about that.
  3. Meaning that ok may be in a different timezone than you are.
  4. Has it ever occurred to you that we have users from all over the world?
  5. We need to get one of them forums with built-in social networking features
  6. 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
  7. It's behaving as expected. tags highlight PHP code. For general code you may use the [code] tags.
  8. Noobs. Everybody knows that you do not run beta software on production environments.
  9. 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.
  10. 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.
  11. 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.
  12. 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.
  13. Yes, specify the path to the file on the disk. Or generate the thumbnail yourself.
  14. 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.
  15. Yeah it sounds like permission problems. Try to chmod the upload dir recursively to allow write permissions for the httpd.
  16. No problem. Remember to click the "Topic Solved" button when you're done. I did it for you this time though
  17. 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>
  18. Try $this->update(array('lft'=> new Zend_Db_Expr('lft + 2')), 'lft > ' . $lft); Which class does $this refer to here?
  19. 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.
  20. Duh... yes there is: "Teach Yourself X in 24 Hours" Really though, don't waste your money on such books.
  21. You may want to read this: http://www.phpfreaks.com/tutorial/php-security
  22. No... there could be reasons why you wouldn't want people to snoop around your stuff even though you are not doing anything illegal. Like for instance things that would be embarrassing, just guarding your private life, or protecting yourself from power abuse.
  23. ?
  24. Pseudo-code is code that's not indented to be actually used, but merely to show the concept of how things are done. This means you'll have to adapt it to your specific problem. I haven't touched the Wordpress code before so I don't know how it works. Perhaps it would've been easier if I wrote my pseudo-code in English instead of PHP:
×
×
  • 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.