Mobile app version of vmapp.org
Login or Join
Martha676

: Software which will fetch all relevant included files for a web app? Hopefully this is the correct Stack Exchange site to be asking this question. I've inherited a fairly large web app from

@Martha676

Posted in: #Php

Hopefully this is the correct Stack Exchange site to be asking this question.

I've inherited a fairly large web app from the previous IT guy at my organisation. It's written in PHP and there's no documentation. My PHP is very rusty at best but I've been given the task of looking at the code for the web app, working out what it does, and preparing it so it can definitely be moved to another host with no problems.

The directories in which the relevant PHP, js and css files sit have a whole load of other PHP, js and css files in them - things like early revisions of files, backups, slight changes etc. All very messy.

I'd like to be able to just download locally all the files that are relevant to the app and not all the extra ones so that when I come to look at the code it'll be much easier to untangle. Is there such a piece of software which, when given relevant permissions on the server, goes off and fetches an initial PHP file, looks for any code from includes and downloads them, does the same for css and js files. Is there an IDE which does something similar for when people need to debug and untangle others' web apps?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Martha676

1 Comments

Sorted by latest first Latest Oldest Best

 

@Angie530

I am not aware of any software which would suit your requirements, though you should be able to handle this task without too much manual effort (and, if in doubt, copying everything - symlinks, web server config, database, and all - wholesale is all but guaranteed to work).

wget -r should be sufficient to download the CSS and JS assets.

As for the PHP, you might want to try adding this snippet at the end of the application's footer file(s) to see what's included:

<?php
var_dump( get_included_files() );
?>

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme