reeno1 Posted June 18, 2009 Share Posted June 18, 2009 Hello, I have a file on network drive Q:\REFL\TEML\SCROLL.TXT Would like to import file into mysql table. Think I need client side file read. Then maybe save into php array Then loop through array inserting into table Have used php file with text file on server side and saved into table okay. But Problem I have is the file can not be transferred to mysql server by users. Need to read client side. Hope this makes sense. Any help would be appreciated. Link to comment https://forums.phpfreaks.com/topic/162802-import-client-side-text-file-then-save-into-mysql-table/ Share on other sites More sharing options...
flyhoney Posted June 18, 2009 Share Posted June 18, 2009 You are going to need the user to upload the file to the server. I would start by googling "php file upload". Once the file is uploaded you can read it with PHP and insert it into the database. Link to comment https://forums.phpfreaks.com/topic/162802-import-client-side-text-file-then-save-into-mysql-table/#findComment-859131 Share on other sites More sharing options...
reeno1 Posted June 18, 2009 Author Share Posted June 18, 2009 Thanks for answering. Have just been searching the web. It now seems silly thinking that I could access client side files. Trouble is my users are not capable of uploading files they can barely use a computer. Link to comment https://forums.phpfreaks.com/topic/162802-import-client-side-text-file-then-save-into-mysql-table/#findComment-859133 Share on other sites More sharing options...
PFMaBiSmAd Posted June 18, 2009 Share Posted June 18, 2009 If you have access to the browser, you can install an active-x control and set the security settings on IE browsers that will let your web page access a client-side file. Edit: And if you have that level of access to the client's system, you might as well install a HTTP or FTP server on the client's system and then access the file through that server. Link to comment https://forums.phpfreaks.com/topic/162802-import-client-side-text-file-then-save-into-mysql-table/#findComment-859136 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.