Jump to content

Blank page when instantiating a class


Krummelz

Recommended Posts

OK I'm really frustrated here. I have a class that is meant to handle uploading of files to the server.

 

When I comment out the line that instantiates the class, everything works fine. When I try to instantiate the class, I get a blank page.

 

Here are the most important lines of code:

 

include ($_SERVER['DOCUMENT_ROOT']."/classes/upload/upload_class.php");

$my_upload = new file_upload;

 

I have no idea what to do ???, and have been searching the web for a while now, without an answer.

 

 

Link to comment
Share on other sites

The class is a free download from Softpedia.com -> http://webscripts.softpedia.com/scriptDownload/Easy-PHP-Upload-Download-1861.html

 

I think I may have found the problem, and this killed two birds with one stone - I could not get errors to show even when I did add error_reporting(E_ALL);

 

Adding error_reporting(E_ALL); and ini_set("display_errors","1"); showed me that the $_SERVER['DOCUMENT_ROOT'] in the include line made it point to the wrong directory of "C:/wamp/www/classes/upload/upload_class.php" instead of "C:/wamp/www/WEBSITENAME/classes/upload/upload_class.php"

 

Thanks guys.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.