0

I don't know what exactly happens because I have a page ready to handle-up a login system but it's only programmed in html and css yet. Why?

Because when I try to program something in php like this to start making the login system works;

Document called Connections

<?php
$con = mysqli_connect("localhost", "root", "84df86a16c3bf8fb94dd3824b9144604", "thunderorbit");
?>

My register document with all the html

<?php
require '/ThunderOrbit/Loginscreen/Connections.php';
?>

all the html (I won't paste it or it will ocupy the whole page xD but it works before I write nothing in PHP or using mySQLi with PHP)

The error log;

Warning: require(/ThunderOrbit/Loginscreen/Connections.php): failed to open stream: No such file or directory in C:\xampp\htdocs\ThunderOrbit\Loginscreen\Loginscreen-Index.php on line 4

Fatal error: require(): Failed opening required '/ThunderOrbit/Loginscreen/Connections.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\ThunderOrbit\Loginscreen\Loginscreen-Index.php on line 4

Attention to (include_path='C:\xampp\php\PEAR') please I don't understand what to do, help!!

4 Answers4

0

Maybe PHP Windows and Linux compatibility path, change \ to PATH_SEPARATOR or DIRECTORY_SEPARATOR constants. Reference about PATH_SEPARATOR

Community
  • 1
  • 1
renedet
  • 287
  • 3
  • 12
0

Make sure PHP has access to that file.

serv92
  • 121
  • 2
  • 10
0

If the file you are requiring is in the same directory just name the file.

require('Connections.php');
serv92
  • 121
  • 2
  • 10
0

The solution was here:

Change

<?php

require '/ThunderOrbit/Loginscreen/Loginscreen-Connections/Loginscreen-Connections.php';

?>

To

<?php

require '/Loginscreen-Connections/Loginscreen-Connections.php';

?>

Because PHP isn't the same as HTML or CSS, regarding links.

Dharman
  • 30,962
  • 25
  • 85
  • 135
  • There is a troubleshooting checklist, to help find the cause of the problem in this kind of cases here : http://stackoverflow.com/questions/36577020/failed-to-open-stream-no-such-file-or-directory/36577021#36577021 – Vic Seedoubleyew Jun 12 '16 at 10:21