runnerpaul Posted November 18, 2010 Share Posted November 18, 2010 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 Quote Link to comment https://forums.phpfreaks.com/topic/219056-clean-function-getting-error/ Share on other sites More sharing options...
trq Posted November 18, 2010 Share Posted November 18, 2010 Where is $file defined? Quote Link to comment https://forums.phpfreaks.com/topic/219056-clean-function-getting-error/#findComment-1136018 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.