TechForums - Computer and Technical Discussions

Full Version: Execute Linux commands in PHP by using backticks
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
Reference URL's