|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi Mates ..
that is upload.php I want to know where is the Parse Error .. !! The problem is :- PHP Code:
let's see upload.php PHP Code:
and i want to know How can compare if the File name Founded in the directory ... The File name is Founded , plz Change the name ... Waiting For Helps ![]() |
|
#2
|
||||
|
||||
|
Your problem is here:
PHP Code:
An "else if" statement requires a condition in parentheses just as an "if" statement does. Try changing it to: PHP Code:
To check the filename, use the file_exists() function. I suggest combining that with a while loop and a counter that appends or prepends numbers to the end of the file while file_exists() returns true. This will prevent you from overwriting any renamed files with future files that need to be renamed. |
|
#3
|
|||
|
|||
|
i edited it but also another Problems ...
the problem Parse error: parse error, expecting `'('' in c:\apache\htdocs\upload\upload.php on line 23 and the code is PHP Code:
I hope you see The code well ... If There any Problem ... Tell me and about The file_exsit PHP Code:
Best Regards |
|
#4
|
||||
|
||||
|
You need to be sure all of your "else if" statements include a condition. Your last one (on line 23) does not have a condition in parentheses. If this is the default case that should occur if none of the other conditions are met, you should just use an else.
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > Parse Error !! Made Me tired |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|