Hi everyone,

Just a quick question please.

Its it possible to MOVE index.php files to a different location ??

if companyA registers to advertise would it be possible to move the index.php i have created to http://websitename.com/companyA/index.php

so the complete URL would read http://websitename.com/companyA

Id like to do the above but not sure how to move a file in php ??

any pointers would be very appreciated.

Recommended Answers

All 2 Replies

You could easily do it manually with an FTP program but if your objective is to make it automated, then you can read and write a php module using file_get_contents and file_put_contents (or fopen, fread and so forth if you want to use the more complicated approach).

Member Avatar for rajarajan2017

If the files are in the root/subdirectory then it always works.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.