SharkBait Posted August 23, 2006 Share Posted August 23, 2006 Hi, PHP can only read files server side correct?I am creating a mini-script where I can have PHP read from a file (a CSV) and parse through it.I guess I will need to upload the file to the server, read the file, do my thing and delete the file after succuessful completion.Right now I move the file manually, and then just manually change the filename/path in the script to have it read.There is no other way to do this is there? I do have to put the file on the server correct?Just making sure that this is the way I will have to do it :) Link to comment https://forums.phpfreaks.com/topic/18457-location-of-file-to-be-read-from/ Share on other sites More sharing options...
448191 Posted August 23, 2006 Share Posted August 23, 2006 [quote author=SharkBait link=topic=105381.msg420897#msg420897 date=1156358655]Hi, PHP can only read files server side correct?I am creating a mini-script where I can have PHP read from a file (a CSV) and parse through it.I guess I will need to upload the file to the server, read the file, do my thing and delete the file after succuessful completion.Right now I move the file manually, and then just manually change the filename/path in the script to have it read.There is no other way to do this is there? I do have to put the file on the server correct?Just making sure that this is the way I will have to do it :)[/quote]Everything php does is serverside... Where does the file come from, a client? You're not making much sense to me. Link to comment https://forums.phpfreaks.com/topic/18457-location-of-file-to-be-read-from/#findComment-79404 Share on other sites More sharing options...
Caesar Posted August 23, 2006 Share Posted August 23, 2006 Short answer, yes. PHP is a server side language. Of course you can take a diferent approach, in which you can copy/paste the contents into a textarea and parse it, sort it, and do what you need to with it (Even spit out a CSV file if you like). But if you need to go through the effort of doing that, simply uploading it may take just as much effort, and will likely be simpler to approach. What exactly do you need to do with the data? I guess your goal isn't clear and I'm a bit puzzled as to what you're trying to do. Link to comment https://forums.phpfreaks.com/topic/18457-location-of-file-to-be-read-from/#findComment-79407 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.