LinuxQuestions.org
Help answer threads with 0 replies.
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, 07: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 08:53 AM.
 
Old 07-25-2010, 04: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, 05: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, 01: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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 08:08 AM
javascript - submit an iframe form AM1SHFURN1TURE Programming 1 09-23-2006 06:51 PM
submit a form with javascript djgerbavore Programming 6 06-01-2005 03:46 PM
Authentication by Submit Form in Apache??????? ruiseixas Linux - Security 1 11-23-2003 12:02 AM
shell script form submit precioso77 Linux - General 2 05-18-2003 12:50 PM


All times are GMT -5. The time now is 07:44 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration