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 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? Link to comment https://forums.phpfreaks.com/topic/219056-clean-function-getting-error/#findComment-1136018 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.