View Full Version : Problem with include

07-17-2007, 09:39 PM
I have a function that is inside a file called image_work.php, i include it at the top of my file and then inside this:

if($action == "home") {
if($_FILES['imagefile']) {
handleUpload($_FILES['imagefile'], "thebandits");

anyone know why the include isn't working? the script keeps dying right at the second if statement and i can't figure out why

07-17-2007, 09:51 PM
Are you sure its not being included? Do you see any errors stating otherwise? Try using require() to test whether or not its being included. Have you checked your include path in your ini? Are you sure the file input's name is 'imagefile'?

07-17-2007, 10:43 PM
Define - "the script keeps dying" You need to specifically tell us what it is or is not doing. We only see the information that you post and if it is vague, you will only get vague answers. Are there any errors? If the "if" conditional test is always false and does not execute the function call inside it, you need to state that.

I suspect that checking your web server log for errors and/or putting the following two lines in after your first opening <?php tag will point to why it is not working -

ini_set ("display_errors", "1");