[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 248
  • Last Modified:

haven problem uploading files from a client

hi

im using a free server for tesing my php page  which  takes a file from the clients directory and uploads it to my servers directory the code is working fine on my local machine but provides error like "NO SUCH FILE OR DIRECTORY EXSTS" when uploaded and runned on a php server

the code for this functionality is as

function UploadFile()
  {
   global $PathString;
   global $FileName;
   $files=explode("\\",$FileName);
   $file=array_pop($files);
   $file=trim($file);
   copy($FileName,"./".$PathString."test.htm");
 }

where $Filename is the file selected using form input type file .plz solev this problem and provide me with a sample code which provides the above functionality
0
kami1234
Asked:
kami1234
1 Solution
 
harwantgrewalCommented:
What I think the uploading directory in not set on the PHP server..


Harry
0
 
Richard QuadlingSenior Software DeverloperCommented:
To see what settings your PHP has create a file info.php with ...

<?php phpinfo(); ?>

Regards,

Richard Quadling.
0
 
LornaJaneCommented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
deleted
Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

LornaJane
EE Cleanup Volunteer
0
 
us111Commented:
hmm I provide a link to learn how to upload a file
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now