开发者

I can see and open file from index in apache but from address bar it gives me a file not found error? error log : not found or unable to stat

开发者 https://www.devze.com 2023-03-28 14:35 出处:网络
Here is my code snippet to go to the required page :Code to go to next page . <a href=\"text.php?post_id=<?php echo \"$postid\"+ \"$one\" ; ?> \">NEXT </a><br/>

Here is my code snippet to go to the required page :Code to go to next page .

<a href="text.php?post_id=<?php echo "$postid"  + "$one" ; ?> ">NEXT </a><br/>

and the code of processing page that again r开发者_运维百科eturn to the same page :

$postid = mysql_real_escape_string($_GET['post_id']);

$get_next_page = "SELECT post_title from posts where post_id ='$postid' ";
$confirm_next_page = @mysql_query($get_next_page) ;
if(!$confirm_next_page)
{
echo "<a href=\"javascript: history.go(-1)\">Back</a></h2>". mysql_error(); 
}
while($row =@mysql_fetch_array($confirm_next_page))
     {
    $redirect_page = "post.php?post_id=$postid&post_title=$post_title";
    header("location : $redirect_page ");
}
?>

when I execute this code I get 404 page not found .I have checked the permissons and they are set to read/write for me . If I go to index of / , it shows me a Back button as required and this error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

Thankx !


Ok, 404 means that the server is unable to find the file you're looking for. (404 literally means file not found). If you are getting this error, it means that you have probably mis-typed the name of the file. To be sure, however, you may wish to make sure that there are no .htaccess files or the like in the directory you're working in -- those can cause problems, but my experience is that bad .htaccess results in a 500 because it involves a redirect resulting in a 404

The reason you're getting that MySQL error is probably because you have entered the url correctly, but you have omitted the post_id parameter. If this is the case, that means that you have turned your error reporting down below maximum. I highly recommend that you turn them back on high.

0

精彩评论

暂无评论...
验证码 换一张
取 消