Hey guys, im pretty new here, but i have a problem with one of my scripts. I recently moved my website from Servage.net to Powweb.com . Servage wouldnt allow normal php functions such as rename() etc, so i had to configure php/FTP uploading of files.
Now though, Powweb wont allow FTP uploading in files, therefore im now configuring it to use the php uploading.
My only issue at the moment is that i get a T_ENCAPSED_AND_WHITESPACE, and i cant for the life of me figure out the problem.. :-(
The error I get is:
PHP Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /hermes/web07/b75/pow.somewebsite/htdocs/somedir/somefile.php on line 295
The code extract is:
[-291-] foreach($FILES as $file_name => $file_array){
[-292-] if(isset($FILES['charimg']['name'])){
[-293-] if($file_array['name']==$FILES['charimg']['name']){
[-294-] if(is_uploaded_file($FILES['charimg']['tmp_name'])){
[-295-] move_uploaded_file($file_array['tmp_name'], "$chardir/$file_array['name']");
[-296-] }
[-297-]
Note:- The reason i have done it like that is because there is only ever two images uploading on my script, but its never possible to tell if both or none are actually being uploaded.. (affects database further on down script);
Any help would be greatly appreciated.
Also, the numbers [-295-] etc, they are not the problem, they display on the file editor i created for line reference, but are removed when the file is written.
Thanks in advance
KarlBeK0d3r