Jump to content

clean function - getting error


runnerpaul

Recommended Posts

Hi,

 

I am creating a website but am having trouble with the following:

 

I have an include file(db.inc) which contains the following:

 

function clean($input, $maxlength)

{

$input = substr($input, 0, $maxlength);

$input = EscapeShellCmd($input);

return ($input);

}

The file I am having the problem with is my view.php file. I get the following error:

 

Notice: Undefined variable: file in C:\wamp\www\fermpix\view.php on line 4

 

Line 4 contains the following:

$file = clean($file, 4);

 

My view.php does have the line:

include 'db.inc';

 

 

Does anybody have any idea what the issue might be?

 

Cheers

Paul

 

Link to comment
https://forums.phpfreaks.com/topic/219056-clean-function-getting-error/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.