SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: Stupid /'s!!!!

  1. #1
    SitePoint Zealot New Oddity's Avatar
    Join Date
    Jun 2001
    Location
    Georgia
    Posts
    102
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Stupid /'s!!!!

    Argh!!!!! I need to get rid of the / in uploaded file names... This is the line,
    PHP Code:
          $nameOfFile ereg_replace ("\\"""$nameOfFile); 
    This is the error,
    Warning: REG_ESCAPE in /usr/local/apache/htdocs/document/upload.php on line 54

    Argh! I just wanna get rid of the / and leave magic quotes on. I cannot turn it off for that one page because there are other parts that need magic quotes... Any ideas!
    --Odd
    "We all live in a yellow subroutine."
    "Some call it insanity; I call it inspiration!"

  2. #2
    SitePoint Zealot New Oddity's Avatar
    Join Date
    Jun 2001
    Location
    Georgia
    Posts
    102
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    fixed it... I used a str_replace with the same syntax and it worked fine, I do not know why erge_replace does not like "//" but oh well,,, what ever works...
    --Odd
    "We all live in a yellow subroutine."
    "Some call it insanity; I call it inspiration!"


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •