我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

如何限制用户通过网址访问其他网页?

There are 3 users logged in, and each one has their own profile page. How can I restrict others from accessing other profile pages by url?

Before outputting the contents of the profile page, check if the id of the currently logged in user is the same as the id of the owner of the page.

If it does not match show a "permission denied" page instead of the profile.

近期文章

  • 如何获取按列名索引的数组?
  • 如何获得Paypal Checkout返回数据
  • 使用symfony 4中的PhpOffice \ PhpSpreadsheet从excel文件中读取数据
  • 如何在包外部配置多个orm映射原则
  • PHP和MySQL投票系统OOP [关闭]
  • 从ip检测国家/地区并重定向到国家/地区
  • 是否阻止了与特定端口的传出连接?
  • 如何使用Jquery和PHP从.ajax HTTP请求中检索数据?
  • PHP上的shell_exec和exec没有返回字符串
  • 使用Jquery将URL变量传递给PHPExcel
  • php-phantomjs:如何启用磁盘缓存
  • 如何使用cUrl获取文件的内容并插入textarea
  • 如何在PHP中组合两个IF语句
  • 从PHP插入textarea元素到MySQL
  • 使用gzwrite()和gzclose()后,filesize不正确
  • 将自定义列添加到Woocommerce 3+中的“我的帐户订单”表
  • 从php和mySQL中的select语句中选择
  • 在AJAX中提交表单后显示用户的所有错误
  • CSV和fgetcsv中的特殊字符
  • 为什么返回后的进程未在Controller Codeigniter中处理

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华