08-02-2008, 05:30 AM
You can execute linux commands within a php script - all you have to do is put the command line in backticks (`).
Recently, I had to upload an archive to a server which did not allow ssh. For files that I need to transfer, I just package them up in a neat archive and transfer the archive file via scp. Not having ssh access however, I uploaded the archive file via ftp and created a script which extracts the file the file looks like the following:
Posted at http://www.goodphptutorials.com/out/Exec..._backticks
Recently, I had to upload an archive to a server which did not allow ssh. For files that I need to transfer, I just package them up in a neat archive and transfer the archive file via scp. Not having ssh access however, I uploaded the archive file via ftp and created a script which extracts the file the file looks like the following:
Posted at http://www.goodphptutorials.com/out/Exec..._backticks