All In One Script
MENU

rsync only *.php files

by 4:15:00 AM
undefined
rsync only *.php files How can I rsync mirror only *.php files? This gives me a bunch of empty dirs too and I don't want those. rsync -v -aze 'ssh ' \ --numeric-ids \ --delete \ --include '*/' \ --exclude '*' \ --include '*.php' \ user@site.com:/home/www/domain.com \ /Volumes/Servers/ Answer: The culprit here is the --include '*/' When including a wildcard followed by the trailing forward-slash you're telling rsync to transfer all files ending with a '/' (that is, all directories).Thus, rsync -v -aze

Downloading php files?

by 4:13:00 AM
undefined
Downloading php files? Is it possible to download php files from the server where they are located? I am a beginner in web area, and I worry that hackers may have special tools to download, see my code and understand where I have programmed vulnerable codes to hack my site. Answer: If the server is properly configured and there are no security holes in the code then no, it's not possible. If you have something like echo file_get_contents($_GET['myFile']); then this could be used to get

How to include PHP files that require an absolute path?

by 3:41:00 AM
undefined
How to include PHP files that require an absolute path? I have a directory structure like the following; script.php inc/include1.phpinc/include2.php objects/object1.phpobjects/object2.php soap/soap.php Now, I use those objects in both script.php and /soap/soap.php, I could move them, but I want the directory structure like that for a specific reason. When executing script.php the include path is inc/include.php and when executing /soap/soap.php it's ../inc, absolute paths work, /mnt/webdev/[project name]/inc/include1.php... But it's an ugly solution if I ever want to move the directory to a different location. So is there a way to use relative paths, or a

Instagram