Search results

  1. M

    what permissions do I need to use php to write to file?

    Two additional entries returned by readdir are "." and "..". Try var_dump or print_r to see what the other entry is. Also print $url to make sure the scripts in the right directory. You could install XAMPP or WAMP along with the XDebug extension, Eclipse and its PDT extension. This will let...
  2. M

    Please help -myphpadmin

    Variables don't need to be quoted. Only string literal array indices outside of strings and within complex syntax should be quoted, because, well, they're strings: $_POST['email']; "$_POST[email]"; "{$_POST['email']}"; $key = 'email'; $_POST[$key]; "${_POST[$key]}"; "{$_POST[$key]}"...
  3. M

    Passing values

    Don't worry, I haven't forgotten you. I'm going to post an answer when I get the chance. In the meantime, have you been studying the linked pages?
  4. M

    Please help -myphpadmin

    cPanel Tutorial: Files - File Permissions, but PHP scripts don't need to have execute permission. The minimum mode is 0600, giving the owner read permission and nothing else. Please post a minimal test case and a link to a live sample. It's very hard to answer questions about code without...
  5. M

    Flash AS3 - Dialog Box (Returns Full File Path)

    You're right. On closer examination, it looks like C#. Does debugging reveal anything of interest?
  6. M

    what permissions do I need to use php to write to file?

    In this line, you're checking for $pathinfo in $allowedExtensions, whereas the file extension is stored in $extension. Efficiency notes: you're reassigning $allowedExtensions each time through the loop even though it's loop invariant. Move it outside the loop and either make it a static...
  7. M

    Flash AS3 - Dialog Box (Returns Full File Path)

    According to kirupa, OpenFileDialog's FileName property contains the full path. If that doesn't work, you could always inspect the dialog in a debugger. In Flash AS3, File's nativePath and browseForOpen() look promising.
  8. M

    what permissions do I need to use php to write to file?

    You need to use glob to expand file patterns or (e.g.) substr to extract the file extension. $file="*.jpg" is just a string comparison; '*' is not magical in any way.
  9. M

    Changing Web Banner for Different Pages of a Site?

    Tables? Yech. (Dave Winer also has something to say about using tables for layout). Is the header section reproduced in every page? Are you using templates? Are you using server side includes or scripting to include the header section?
  10. M

    discussion: php script design

    I don't find file size (in terms of lines or bytes) or file count to be useful metrics, since they're rather simplistic and don't address design concerns. My main development guideline is "reduce dependencies"; each line should depend on other lines, each function on other functions, each class...
  11. M

    what permissions do I need to use php to write to file?

    Except that if he tries to create a directory with the same name as a non-directory file, is_dir() will return false and the mkdir will fail. Directories are a special kind of file, as are symbolic links and junction points; file_exists is very appropriate. Maybe. Permissions will always be an...
  12. M

    MYSQL New Tricker

    I'm more knowledgeable of Flex than Flash, but I can give you some pointers. You'll probably want to have the PHP script output the news items as XML. Some format like: <?xml version="1.0" encoding="iso-8859-1"?> <news> <item> <headline>Stix Nix Hick Pix</headline>...
  13. M

    substitute wget with PHP code..

    X10 has the curl extension installed.
  14. M

    what permissions do I need to use php to write to file?

    Remember that Windows doesn't use Unix style permissions. If you read the PHP.net documentation for mkdir, you'll see that the $mode argument is ignored. Make sure whichever user the Apache process runs as has write access to ROOT . 'gallery/'. You can use procexp to figure out what user httpd...
  15. M

    javascript appendChild

    They're sort of there. Some newline characters (looks like every one after the first few) are preceded by an extra null character, which throws off decoding UTF-16. Hmm... You could try transfering in binary mode if you used ASCII mode before, but I doubt that'll fix the problem. You could...
  16. M

    javascript appendChild

    The kanji is preventing the JS from being executed, so I can't evaluate what else is going wrong. The document is also missing a <head> element and a closing tag for the <script>. What did you use to u/l the page? Rather than posting a page with all your code, write a minimal test case and post...
  17. M

    javascript appendChild

    @OP: The fragment you posted works for me. Would you provide a link to a live minimal test case? Note that you can get the body element with document.body; no need to call 'getElementsByName'. area is an object like any other. You can use area.constructor.prototype to add "class" properties...
  18. M

    How do you tell how much a resources a script uses?

    Also take a look at memory_get_usage, memory_get_peak_usage and getrusage. You can use Zend profiler or XDEBUG with XAMPP to profile your script and get timing information.
  19. M

    PHP MYSQL Connect

    @tmv105: to reiterate,
  20. M

    IE8 Compliance

    To be fair, MS had a bug fix/new feature/time tradeoff they had to deal with. They had many, many bugs to fix in a way that didn't break too many pages. Google didn't have as much legacy code or bugs to deal with, so they could focus on features.
Top