Re: Using Excel Spreadsheet Writer
| From: | brian | Date: | Mon, 16 Jul 2007 21:49:35 +0000 |
| Subject: | Re: Using Excel Spreadsheet Writer | ||
| References: | 1 2 3 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-27674@lists.php.net to get a copy of this message | ||
Tom Synnott wrote:
Thanks Brian... Well I found this example in the manual... Can I add it to my Excel page? Or do I now need to create another script? Because I need the whole page to run all together if possible... <?php $uploaddir = '/var/www/uploads/'; $uploadfile = $uploaddir . basename($_FILES['userfile']['name']); echo '<pre>'; if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {Well, that's just an example. I wouldn't echo out the "Possible ... atack!" string, for instance. As for using it with your script, i can't really say. You'll need to work on getting file uploads working properly to begin with. What you then do with the file afterwards is a whole other thing. You should write at least a basic script from scratch to make sure you understand what's happening there. You might then want to check out the HTTP_Upload PEAR package [1]. I've never used this package, myself, but you can address any queries about it to this list. [1] http://pear.php.net/package/HTTP_Upload brianecho "File is valid, and was successfully uploaded.\n";} else {echo "Possible file upload attack!\n";} echo 'Here is some more debugging info:'; print_r($_FILES); print "</pre>"; ?>