-2

At the top of my code I have the following

require_once 'PSBE_LOGIN';

where PSBE_LOGIN has all the information to access my database(I'm using a PDO connection). However, my code does not work but when I take it out, my code works perfectly. Any thoughts on why this is? I need the file there so I can collect information from my database.

user3826764
  • 198
  • 1
  • 9

2 Answers2

0

Hi try this ( no quotes )

require_once PSBE_LOGIN;
ArtisticPhoenix
  • 21,464
  • 2
  • 24
  • 38
0

Require (as opposed to include) will halt the execution of a script on failure. For example, if the specified file is not found.

Thus your code can be fixed by ensuring the file exists and in the correct directory.

Scott
  • 126
  • 5