Re: How to fix PHP Notice: Use of undefined constant tmp_name ?
| From: | Stephen | Date: | Fri, 27 Mar 2015 18:58:07 +0000 |
| Subject: | Re: How to fix PHP Notice: Use of undefined constant tmp_name ? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-324719@lists.php.net to get a copy of this message | ||
On 15-03-27 02:54 PM, Release Edl wrote:
My file uploader doesn't work since I update the php verdion. One notice I found was "Use of undefined constant tmp_name" and others.... A piece of the problem script: $url = $_FILES['url']; if(file_exists("Imagem1/$url[name]")) { $url2 = $url_name."1"; } else { $url2 = $url_name; } if(!copy($url[tmp_name], "Imagem1/$url2")) { } $urlf = $root."Imagem1/$url2"; Thanks in advance for some help.Is tmp_name a constant? A variable? Is it defined or populated? Should it be in quotes? -- Stephen