简体   繁体   中英

404 error on file that IS ON SITE

Okay, so on my site for some odd reason, I get a 404 error that is on a file that all says its on the site. Create.php does not show up. Just 404's (Along with aaa.php, but I can still use HTTP services to access it.) This is the image of my file list: http://ctrlv.in/485842

This is my 404 error: http://ctrlv.in/485844

Last but not least, this is my code:

<?php
$servername = "localhost";
$username = "robx10ho_users";
$password = "fakiefakie";
$dbname = "robx10ho_usersuse";
$usn = $_REQUEST['usn'];
$psw = $_REQUEST['psw'];

// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
} 

$sql = "INSERT INTO login (Username, Password)
VALUES ($usn, $psw");

if ($conn->query($sql) === TRUE) {
    echo "New record created successfully";
} else {
    echo "Error: " . $sql . "<br>" . $conn->error;
}

$conn->close();
?>

Your code seems fine, your problem is probably your host, you could try adding another page for testing purposes, so you can see if it just that page or every.

Also very IMPORTANT dont post your database security details, just leave it out. We can allways look at your code without having those important details.

The problem is probably on the server and not in PHP . I am taking a guess that files are not there but your sitemap is being cached. Check out if your files exist on the server using FTP or SSH connection (if possible).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM