* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * MA 02110-1301, USA. */ //Check if form has been submitted if (isset($_POST['create_link'])) { // -- HANDLE FORM -- // //Initialize message and error variables $_error_exists = 0; $_error_msg = ''; } ?> Create Symlink

Create a symlink


This script creates a symlink on a linux server running php using the php symlink() function.

Please note that this will only work on a Linux/Unix host OR a Windows Vista host running PHP 5.3 or higher. See official php documentation (en) for more details.

Please enter the path to the target (what the link points to) and the path to the link (the thing doing the pointing) in the form below. You'll receive confirmation that the link was created or not.

If you have experience with symbolic links in linux, skip this next bit. However, if you don't have experience creating symbolic links, please be sure that the link (the thing doing the pointing) does not already exist! Otherwise the new link will not be created. Also keep in mind the difference between relative and absolute paths. Absolute paths will start from the root directory (i.e. /var/www/http/mystuff - notice the leading slash) and will be valid no matter what the location of this script is. You may need to check with your host if you're on a shared host, what the absolute path to your directory is. Relative paths, on the other hand, will not start from root (i.e. myfolder/http/mystuff - notice the lack of leading slash) and they will be assumed to be relative to the location of this script. So if this script is located in /var/www/myaccount/http/ and you pass it a path that looks like mystuff/mytarget it will assume the equivalent of an absolute path of /var/www/myaccount/http/mystuff/mytarget. Just be careful or your link may not point where you think it does. For more info, try wikipedia's symlink article.


Error exists:

Target:
Link:

I'm sorry, but I don't support or guarantee this script. Use it at your own risk. Also, it is freely distributable under the GPL. See comments for more information.