Search Result

Collapse
2 results in 0.0013 seconds.
Keywords
Members
Tags
escape
  •  

  • ezechiel
    started a topic problem with spaces in directory name
    in Perl

    problem with spaces in directory name

    Hi everyone,

    I have a question about spaces in directory names.
    If I want to use mkdir something, everything works out, but in this case:
    Code:
    #!/usr/local/bin/perl
    #
    use warnings;
    
    $homedir = "C:/SCRIPT/CJ0249A.1/\"Project Information\"";
    $file = "$homedir/exist.txt";
    
    if (-e "$file")
    {
            print ("it exists");
    ...
    See more | Go to post

  • When should special characers be escaped inside strings?

    Hi all. I picked up the following code example from the php manual:
    Code:
    $link = mysql_connect('mysql_host', 'mysql_user', 'mysql_password')
        OR die(mysql_error());
    
    // Query
    $query = sprintf("SELECT * FROM users WHERE user='%s' AND password='%s'",
                mysql_real_escape_string($user),
                mysql_real_escape_string($password));
    My question is, shouldn't we be escaping...
    See more | Go to post
    Last edited by Atli; May 18 '09, 07:07 PM. Reason: Moved to the PHP forum, and the title cleaned up a bit.
Working...