Solved

haven problem uploading files from a client

Posted on 2001-08-11
6
197 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:RQuadling
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
advertisement module in core php 4 92
PHP string issue 5 18
sql sentence 2 13
Why does my array not "dump?" 5 20
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.  …
Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

759 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

17 Experts available now in Live!

Get 1:1 Help Now