arp1445
Member
- Messages
- 47
- Reaction score
- 0
- Points
- 6
hi... I'm using x10's free hosting service...
I wrote a function as below:
I wrote this function for prevent url injection.
This works fine on my local server... But not working on remote server...
The strange thing is: 1)I created a new php file (for test only) and it works fine on remote server. 2) When I try with my existing files - include it, or wrote function as standalone - it did not worked
Can anyone tell me how to fix and whats going on?
Thanks in advance.
I wrote a function as below:
PHP:
function prevent_url_injection($unsafe) {
// preventing from sql injection by url get method
$find_eveil_chars = array("'", "\"", "#", "//", "/*", "*/", "--");
$safe = str_replace($find_eveil_chars, "", $unsafe);
return $safe;
}
I wrote this function for prevent url injection.
This works fine on my local server... But not working on remote server...
The strange thing is: 1)I created a new php file (for test only) and it works fine on remote server. 2) When I try with my existing files - include it, or wrote function as standalone - it did not worked
Can anyone tell me how to fix and whats going on?
Thanks in advance.
Last edited: