how to disable php warning mk.dir() -


This is about this script: when uploading a file, first check that the directory "upload" exists or not If not: directory. When a directory is already present and uploading a file, a warning comes:

WARNING: mkdir () [function.mkdir]: File exists ....

How to disable this warning? Array Export $ Exits = Array ("gif", "jpg", "jpg") with {// permission ($ _ server ['REQUEST_METHOD'] == 'POST') {// with permission

, "Png", "zip", "html", "html", "js", "css", "low", "tctt", "php"); $ Temp = Explosion (".", $ _FILES ["file"] ["name"]); $ Extension = end ($ temp); // map "upload" if $ root = '/ upload /' does not exist; If (! Is_dir ($ root)) {mkdir ("Upload /", 0777); Echo 'map upload is created!'; If (($ $ _FILES ["file"] ["type"] == "image / gif") ($ _FILES ["file"] ["type"] == "image / JPEG") || ($ $ _FILES ["file"] ["type"] == "image / JPG") ($ _FILES ["file"] ["type"] == "image / PJPAG") ($ _FILES ["file" ] ["Type"] == "image / x-png") ($ _FILES ["file"] ["type"] == "image / png") ($ _FILES ["file"] ["type"] == "text / html") ($ _FILES ["file"] ["type"] == "text / javascript") ($ _FILES ["file"] ["type" "$ $ _FILES" file "] [" Type "] ==" text / less ") || ($ _FILES [" file "] [" type "] ==" app / zip ") ($ _FILES [" file "] [" type "] ==" text / plain ") & amp; ($ _FILES [" file "] [" size "] <20000000) & Amp; in_array ($ extension, $ permission granted)) {// resonance if the upload has succeeded 'status: upload succesvol!
' echo 'Best': $ _FILES ["file
'' echo '' type: '. $ _FILES ["file"] ["type"]'
'; Guco' Growet : '. ($ _FILES ["file"] ["size"] / 1024). 'KB & lt; Br / & gt; '; $ Newfilename = uniqid (). "End" (explosion (".", $ _ Files ["file"] ["name"])); Move_uploaded_file ($ _ files ["file"] ["tmp_name"], "upload /". $ Newfilename); // This Pad Nair is the best and GeolPod; Root state echo 'url:' to upload the map to the root server. '& Lt; B & gt; Http: //www.jouwwebsite.nl/uploads/ '$ Newfilename' & lt; / P & gt; Echo '& lt; Br / & gt; & Lt; Br /> ';; } Else {// echo if file extension is not allowed, then "Knit tozezten best end"; }} And {}}} / / end request_post post? & Gt;

$ root = '/ upload /'; There is a complete path, and the following condition is probably making a false return every time. Then it tries to create an "upload" folder using a relative path, which was previously created on the last run of your script, thus error.


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -