Grep in cPanel or Shared Hosting Environment
June 28th, 2018
160 words · 1 minutes read
Being a command-line geek myself, it can be a massive pain in the ass not having SSH access to a client’s hosting service. Simple things like finding where a previous developer has declared some variable or template code can become what feels like a never-ending nightmare.
Never mind dear, PHP to the rescue…
1 |
|
Keep in mind this code is basically just calling out to the command line, and that no filtering on that $search variable is performed here. Also, knowing my luck, I’ll find a host that has disabled access to shell_exec before too long.
Be careful out there 😉
Posted in: Tech
