Archive for March 22nd, 2005

PHP - File Uploading How-To

Tuesday, March 22nd, 2005

Use the following code in your target page from the file upload form to handle saving the file on the server:

//set the destination directory$uploaddir = '/var/www/uploads/';//set the destination file name$uploadfile = $uploaddir . $_FILES['userfile']['name'];print('');//move file to designated directory, then test if successfulif (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)){    print('File is valid, and was successfully uploaded. ');    print('Here's some more debugging info:n');    print_r($_FILES);}//show if problems occurelse{    print('Possible file upload attack! Debugging info:n');    print_r($_FILES);}print('');

Link: http://www.php.net/features.file-upload

Cross-Plattform Versioning System: In the search for an alternative to VSS!

Tuesday, March 22nd, 2005

In a cross-plattform development environment, something that only works in windows is terribly restrictive. Its even worse, if there are no Linux clients available. In this case the dilema is Visual Source Safe. While a good package overall, I have identified the following shortcomings:
- No good rollout process.
- Server application is Windows only.
- Client application is Windows only. I haven’t been able to find a Linux client for this.
- In order to access the VSS database on a remote computer, you need to have VSS installed locally.

What I am looking for:
- A cross-plattform solution that provides clients for at least Windows and Linux.
- The server application itself can run on a windows box, but a solution that caters to at least Linux and Windows is preferrable.
- A system that supports incremental rollouts and patches, concurrent versioning, multi-checkout capable, …

So far I’ve come accross the following:
- JEDI CVS
- CVSGUI: graphical frontends for various CVS-based systems.
- TortoiseCVS: a windows client for CVS.
- GNU CVS: opensource CVS system.

Research to be continued on the various available packages…