Announcement

Collapse
No announcement yet.

Rename file during upload

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    rename("/grp__NM__bg__NM__y5 LOGO1.jpg","bgr.jpg"); ??
    What is that slash doing there? I assume you want a relative path from the server dir or something? Or did you mean rename("grp__NM__bg__NM__y5 LOGO1.jpg","bgr.jpg"); (no slash)..
    It is not common to rename a file to another directory which is what you are doing..
    Check out: http://php.net/manual/en/reserved.variables.server.php
    This is your document root: $_SERVER['DOCUMENT_ROOT']
    This is thus where you www files are placed. So doing a rename needs to take that path into account. Unless you are already on the proper dir that is. Use getcwd() for that.

    Comment

    Working...
    X