Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| <?php | |
| #Put this on root cpanel files and execute via terminal | |
| # php getmails.php | |
| $accountcpanel = ""; | |
| $domain = ""; | |
| $mailpath = "/home/".$accountcpanel."/mail/".$domain; | |
| $mails = glob($mailpath . '/*' , GLOB_ONLYDIR); | |
| foreach($mails as $mail) { |
| //https://stackoverflow.com/questions/21911297/how-to-remove-both-php-and-html-extensions-from-url-using-nginx/21915845#21915845 | |
| location / { | |
| try_files $uri $uri.html $uri/ @extensionless-php; | |
| index index.html index.htm index.php; | |
| } | |
| location ~ \.php$ { | |
| try_files $uri =404; | |
| } |
| //Thanks to https://stackoverflow.com/questions/56414640/paypal-checkout-javascript-with-smart-payment-buttons-create-order-problem | |
| paypal.Buttons({ | |
| createOrder: function(data, actions) { | |
| return actions.order.create({ | |
| purchase_units: [ | |
| { | |
| reference_id: "PUHF", | |
| description: "Some description", |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| var http = require('http'), | |
| util = require('util'), | |
| formidable = require('formidable'), | |
| server; | |
| server = http.createServer(function(req, res) { | |
| if (req.url == '/') { | |
| res.writeHead(200, {'content-type': 'text/html'}); | |
| res.end( | |
| "<div align='center'>"+ |