简体   繁体   中英

Laravel project acting different on shared hosting

I have just uploaded my project to shared hosting. It works fine on my localhost server. Is there a difference with the way session data is stored on shared hosting?

        $user_id = auth()->user()->id;

        $item= Listings::where('id',$id)->first();

        if($item->id === $user_id){
    }
else
{
                abort(404);
}

It keeps throwing a 404 error ?

did you move your public file to your root folder on your share hosting ?

because you need to be careful about this section. and usually as i experienced before, it's just about your boostrap location and public file location.

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