我是一个自学者,所以对传统的 Web 开发不太了解,但是我已经编写了一个完整的社交网站,但我不知道如何调试。我的网站有一些问题,我需要学习调试/
首先,我需要说明如何在 WAMP 上安装 Xdebug(因为我使用 phpDesigner)。每次遇到新错误时,我都会尝试使用网络上的教程进行很多尝试。我还尝试将它放在 /ext/ 目录中并从 WAMP PHP Extensions 菜单中激活它。不工作!
因此,如果有人在外面使用 PHPDesigner 和 Xdebug(不是随附的软件包,而是将其安装在 WAMP 上),请帮助我,我将不胜感激。顺便说一句 PHP 版本是 5.3.0
接下来是我网站的控制流程如何:-
htaccess -> redirect everything to index.php if file doesn't exist.
index.php ->
include all libraries (__autoload).
initialize classes.
Get the $_SERVER['REQUEST_URI'] to get the $page.
If $page is found
Check if the user is logged in,
if yes then include view/$page.php
or else redirect to login.php page
If page is not found then
redirect to 404.php
这个控制流是否适合调试?因为我真的无法理解真正的 MVC 概念,所以我创建了这样的东西。