First, Lets find out what version of PHP we're running (To find out if it's the default version).
To do that, Within the terminal, Fire this command:
which php
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"/> | |
| <meta name="viewport" content="width=device-width"/> | |
| </head> | |
| <body style="height: 300vh"> | |
| <svg style="position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);" | |
| width="655" height="209" viewBox="0 0 655 209" fill="none" xmlns="http://www.w3.org/2000/svg"> | |
| <path d="M653 207V62C653 28.8629 626.228 2 593.091 2C519.318 2 391.639 2 292.675 2C270.583 2 252.717 19.9124 252.717 42.0038C252.717 63.5378 252.717 81.7221 252.717 81.7221C252.717 81.7221 252.717 81.7221 252.717 81.7221V167C252.717 189.091 234.808 207 212.717 207H2" | |
| stroke="#EAECF0" stroke-width="4" stroke-linecap="round"/> |
| <?php | |
| $base64_usrpwd = base64_encode($_POST['user'].':'.$_POST['pass']); | |
| $ch = curl_init(); | |
| curl_setopt($ch, CURLOPT_URL, 'http://localhost:8080/rest/api/2/issue/'); | |
| curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | |
| curl_setopt($ch, CURLOPT_POST, 1); | |
| curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json', | |
| 'Authorization: Basic '.$base64_usrpwd)); | |
| <html> | |
| <head> | |
| <script src="jquery-2.1.4.js"></script> | |
| <link rel="stylesheet" type="text/css" href="styles.css"> | |
| </head> | |
| <body> | |
| <div id="wrapper"> | |
| <h1>Create Issue</h1> | |
| <form id="create-form"> | |
| Summary: <input type="text" name="summary" id="summary" value=""/> |
| extension UIImageView { | |
| /// Loads image from web asynchronosly and caches it, in case you have to load url | |
| /// again, it will be loaded from cache if available | |
| func load(url: URL, placeholder: UIImage?, cache: URLCache? = nil) { | |
| let cache = cache ?? URLCache.shared | |
| let request = URLRequest(url: url) | |
| if let data = cache.cachedResponse(for: request)?.data, let image = UIImage(data: data) { | |
| self.image = image | |
| } else { | |
| self.image = placeholder |