how should i define session_start();
with include files correctly? because i made a session_start();
at login_proses.php
and i wanna include koneksi.php
but apparently found an error it says that the files cannot found
here is the error warning
Warning: include(koneksi.php): failed to open stream: No such file or directory in C:\xampp2\htdocs\spk\admin\login_proses.php on line 3
Warning: include(): Failed opening 'koneksi.php' for inclusion (include_path='C:\xampp2\php\PEAR') in C:\xampp2\htdocs\spk\admin\login_proses.php on line 3
Fatal error: Uncaught Error: Call to undefined function mysql_query() in C:\xampp2\htdocs\spk\admin\login_proses.php:8 Stack trace: #0 {main} thrown in C:\xampp2\htdocs\spk\admin\login_proses.php on line 8
to make it more clear here is the screenshot
i saved login_proses at -> htdocs/spk/admin/login_proses.php i saved koneksi.php at -> htdocs/spk/koneksi.php
i used localhost/ to run my program
i hope anyone could help me thank you
since the koneksi.php is one step back you should do this in your login_proces.php change include "koneksi.php";
to include "../koneksi.php";
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.