Why do I receive a 404?

Status
Not open for further replies.

DiverseLulz

Learning C# :D
Sep 26, 2011
90
9
On a little project of mine, I receive a 404 message whenever I try to access index.php and it only happens when I use require_once("global.php"); This is my global.php .... What have I done wrong? :confused:
Cheers.
 

brsy

nah mang
May 12, 2011
1,530
272
  1. I think your MySQL connection is wrong. It would work if you used mysqli and said $db = new mysqli($blah, $blah, $blah, $blah);
  2. Try messing around with the define thing, and see if anything changes,
 

Xenous

o shi
Nov 15, 2011
383
101
  1. I think your MySQL connection is wrong. It would work if you used mysqli and said $db = new mysqli($blah, $blah, $blah, $blah);
  2. Try messing around with the define thing, and see if anything changes,

His mysql is fine, he's using a bit of my code.
Its confused me a little since im tired so return a favor and teamview him.
 

brsy

nah mang
May 12, 2011
1,530
272
His mysql is fine, he's using a bit of my code.
Its confused me a little since im tired so return a favor and teamview him.
Will do.

On a little project of mine, I receive a 404 message whenever I try to access index.php and it only happens when I use require_once("global.php"); This is my global.php .... What have I done wrong? :confused:
Cheers.

Tell me your Teamviewer ID and Password in the shoutbox
 

Markshall

Русский Стандарт
Contributor
Dec 18, 2010
2,637
2,389
Technically you're not receiving a 404 error. A 404 error is a document error that is returned when a resource can not be found, such as a webpage.

You are receiving this error because "Diverse" is not define, in global.php change
PHP:
if(!defined(Diverse)){

to
PHP:
if ( !defined( "Diverse" ) ) {

And see what happens.
 

Livar

Now 35% cooler!
Oct 15, 2010
846
86
Yeah do what Mark said I instantly saw that, if you put:

PHP:
if(!DEFINED(Diversity))

It'll assume 'Diversity' has been defined.

So to fix put this:

PHP:
if(!DEFINED('Diversity'))

-livar.
 
Status
Not open for further replies.

Users who are viewing this thread

Top