1条回答 默认 最新
drhib62644 2017-02-26 04:20关注When you ask PHP to open
/db/attendanceyou are specifying an absolute path: a file calledattendancein a directory calleddbin the root of your filesystem.You probably want to specify either a relative path, or an absolute path that is built from your script's location.
Try leaving the leading
/off of the front of your path:$pdo = new PDO('sqlite:db/attendance');or, even better, building it from the
__DIR__magic constant:$pdo = new PDO('sqlite:' . __DIR__ . '/db/attendance');本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报
