LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-25-2010, 06:06 AM   #1
eco
Member
 
Registered: May 2006
Location: BE
Distribution: Debian/Gentoo
Posts: 412

Rep: Reputation: 48
Post form to submit csv file to handle


Hi all,

I'm new to php and need some pointers to worth while documentation 'cause I'm getting nowhere

I want to make a simple html form that allows me to submit a csv file so that I can work on it.

The problem seems to be that if the file is not in the root of the (web) application it won't work.

The form doesn't seem to send the path with it so I am unable to (1) know where the file is, I just get the name of the file and (2) I couldn't access the file anyway as it's outside of the apache environment.

Is there a way to up the file to memory? How would you do this?

Any help or working example or just an explanation why it's all wrong would be appreciated!

Thanks!

Last edited by eco; 07-25-2010 at 07:53 AM.
 
Old 07-25-2010, 03:26 PM   #2
zirias
Member
 
Registered: Jun 2010
Posts: 361

Rep: Reputation: 59
Huh? You can just use a "standard" file input, causing an upload of the file. It will be put in some temporary path (configured in php.ini), but in fact, you don't have to care, just use the $_FILES¹ global to locate it and move it wherever you like.

--
¹ http://php.net/manual/en/reserved.variables.files.php
 
1 members found this post helpful.
Old 07-25-2010, 04:39 PM   #3
acvoight
LQ Newbie
 
Registered: Jul 2010
Distribution: Linux Mint
Posts: 21

Rep: Reputation: 1
This will probably help you:
http://www.w3schools.com/php/php_file_upload.asp
 
1 members found this post helpful.
Old 07-26-2010, 12:09 AM   #4
eco
Member
 
Registered: May 2006
Location: BE
Distribution: Debian/Gentoo
Posts: 412

Original Poster
Rep: Reputation: 48
Thank you both for your answers. I thought there was a way.
 
  


Reply

Tags
csv, fopen, php



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
php form submit code not working FirstBorn Programming 3 12-27-2008 07:08 AM
javascript - submit an iframe form AM1SHFURN1TURE Programming 1 09-23-2006 05:51 PM
submit a form with javascript djgerbavore Programming 6 06-01-2005 02:46 PM
Authentication by Submit Form in Apache??????? ruiseixas Linux - Security 1 11-22-2003 11:02 PM
shell script form submit precioso77 Linux - General 2 05-18-2003 11:50 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration