Is it possible to upload a file from a local computer to a web server with PHP without explicitly selecting the file in a form field?

Yes, it is possible to upload a file from a local computer to a web server with PHP without explicitly selecting the file in a form field by using the PHP `file_get_contents()` function to read the file contents and then sending those contents to the server using cURL or a similar method.

<?php
// Specify the file path on the local computer
$filePath = '/path/to/local/file.txt';

// Get the file contents
$fileContents = file_get_contents($filePath);

// Specify the URL of the server endpoint to upload the file to
$uploadUrl = 'https://example.com/upload.php';

// Initialize cURL session
$ch = curl_init($uploadUrl);

// Set cURL options to send the file contents as a POST request
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $fileContents);

// Execute the cURL session
$response = curl_exec($ch);

// Close cURL session
curl_close($ch);

// Check for any errors
if($response === false) {
    echo 'Error uploading file';
} else {
    echo 'File uploaded successfully';
}
?>