How to run a PHP script: Difference between revisions

From QNAPedia
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
If you need to run a php-script in a terminal-session like putty, you can use this command:
If you need to run a php-script in a terminal-session like putty, you can use this command:


mnt/ext/opt/apache/bin/php /path/to/some-php-script.php


mnt/ext/opt/apache/bin/php /path/to/some-php-script.php
;Example running the Backup-Dump script from Mediawiki
 
mnt/ext/opt/apache/bin/php dumpBackup.php --full > /share/Vol2/Wiki-Backup/BWL/YYY-MM-DD.xml
 
Example running the Backup-Dump script from Mediawiki
 
 
mnt/ext/opt/apache/bin/php dumpBackup.php --full > /share/Vol2/Wiki-Backup/BWL/YYY-MM-DD.xml
 
 


Notice that this command was executed from the maintenace directory, where the php-file is located!
Notice that this command was executed from the maintenace directory, where the php-file is located!


Link to putty-website: www. putty.org


[[Category:PHP]]
[[Category:PHP]]
[[Category:Mediawiki]]
[[Category:Mediawiki]]

Latest revision as of 16:09, 19 July 2017

If you need to run a php-script in a terminal-session like putty, you can use this command:

mnt/ext/opt/apache/bin/php /path/to/some-php-script.php
Example running the Backup-Dump script from Mediawiki
mnt/ext/opt/apache/bin/php dumpBackup.php --full > /share/Vol2/Wiki-Backup/BWL/YYY-MM-DD.xml

Notice that this command was executed from the maintenace directory, where the php-file is located!

Link to putty-website: www. putty.org