Solved

haven problem uploading files from a client

Posted on 2001-08-11
6
210 Views
Last Modified: 2006-11-17
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
Comment
Question by:kami1234
6 Comments
 
LVL 5

Expert Comment

by:harwantgrewal
ID: 6376760
What I think the uploading directory in not set on the PHP server..


Harry
0
 
LVL 8

Accepted Solution

by:
us111 earned 25 total points
ID: 6383088
0
 
LVL 40

Expert Comment

by:Richard Quadling
ID: 7176998
To see what settings your PHP has create a file info.php with ...

<?php phpinfo(); ?>

Regards,

Richard Quadling.
0
 
LVL 5

Expert Comment

by:LornaJane
ID: 9571543
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
 
LVL 8

Expert Comment

by:us111
ID: 9571672
hmm I provide a link to learn how to upload a file
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now