A week or so ago I asked (and recieved, thank you) for some help regarding some beginning php I was working on.
I’m building this on a host I pay for, but that has nothing particularly important on it. I haven’t worried too much about security because I don’t care that much.
However.
It does irk me immensely when I feel like I’ve been tresspassed upon, and I think that might be the case.
Basically, today I wanted to work some more on a page I’ve been creating that uses php to upload a file. I went to the page itself and decided to view source. I saw this:
<iframe style=“visibility: hidden; width:0px; height:0px; border:0px” src="/gewdawbewc/fuck.html"></iframe>
… as the very first item in the body.
I sure as heck didn’t code it, but when I look at the actual source in an editor, there’s nothing in the php that looks like it would generate that either.
My php is:
<?php
ini_set ('display_errors', 1);
error_reporting (E_ALL & ~E_NOTICE);
if (isset ($_POST['submit'])) { //Handle form.
// Try to move the uploaded file.
if (move_uploaded_file ($_FILES['thefile']['tmp_name'], "../uploads/{$_FILES['thefile']['name']}")) {
print '<p>Your file has been uploaded.</p>';
} else { // Problem!
print '<p>Your file could nto be uploaded because <b>';
// Print a message based on the error.
switch ($_FILES['thefile']['error']) {
case 1:
print 'The file exceeds the upload_max_filesize setting in php.ini';
break;
case 2:
print 'The file exceeds the MAX_FILE_SIZE setting in the HTML form';
break;
case 3:
print 'The file was only partially uploaded';
break;
case 4:
print 'No file was uploaded';
break;
}
print '</b>.</p>';
}
} // End of SUBMIT IF
?>
… followed by a simple html form. Yet when I open the page in my browser and ‘view source,’ I see that <iframe> tag.
Does anyone have any idea what gives here?