Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 319
  • Last Modified:

Can't get script to connect to database connect script in root.

Can't get script to connect to database connect script in root. It's 2 levels up. Getting HTTP 500 response
register.php
0
QUESTOMNI
Asked:
QUESTOMNI
1 Solution
 
COBOLdinosaurCommented:
shouldn't the path be: ('../mysqli_connect.php') instead of ('.../mysqli_connect.php')

Cd&
0
 
Chris SandriniSenior System EngineerCommented:
two levels up is ../../

so

require ('../../mysqli_connect.php');

Open in new window

0
 
Dave BaldwinFixer of ProblemsCommented:
If it's in the 'root', you should be able to use...

require ('/mysqli_connect.php');

Open in new window

0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
COBOLdinosaurCommented:
Hmmm, that about covers the possibilities; other than hard coding an absolute path.

Cd&
0
 
Ray PaseurCommented:
After you get connected to the data base, you might want to learn about this:
http://php.net/manual/en/mysqli.real-escape-string.php
0
 
QUESTOMNIAuthor Commented:
Thanks.
0

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now