--- Marian Briones <[EMAIL PROTECTED]> wrote:
> I think I'm trashing the idea of making directories for my membership
> site in favor of making a symlink instead if I can get it to emulate
> that. Thing is, I can't find the proper syntax for making a symlink
> with php.
>
> What I'm thinking is that it will link to a page that will bring up
> the user's information dynamically but be symlinked to the name of
> their choice, www.mymembersite.com/catlady where catlady is the name
> of their choice.
>
> But what is the syntax for creating a symlink? I have googled it and
> get this very dry:
>
> int symlink (string target, string link)
>
> symlink() creates a symbolic link from the existing target with the
> specified name link.
>
> See also link() to create hard links, and readlink() along with
> linkinfo().
>
> Okay that's all good but what the [EMAIL PROTECTED] is the proper syntax? I
> want
> to see code! Help? Thanks
>
> (mood: FRUSTRATED)
>
> Marian
The Linux/Unix command for creating a symbolic link is:
ln -s path/to/original/file link_name
The PHP function, though I have not used it, works in the same way.
symlink ("path/to/original/file", "link_name");
You'll probably have to do a change directory before this. Of course, the
directory must be one where PHP can write files via the webserver user.
If I had command line access to the server, I would probably make a Bash shell
script that did all of the file-manipulation tasks and run it from PHP via exec
or system with the proper validation in both programs to make sure people don't
try to do something nasty on your server.
James
_____
James D. Keeline
http://www.Keeline.com http://www.Keeline.com/articles
http://Stratemeyer.org http://www.Keeline.com/TSCollection
http://www.ITeachPHP.com -- Free Computer Classes: Linux, PHP, etc.
Summer Semester Begins Jun 20 -- New Classes Start Every Few Weeks.
------------------------ Yahoo! Groups Sponsor --------------------~-->
<font face=arial size=-1><a
href="http://us.ard.yahoo.com/SIG=12hd2v7j5/M=362335.6886445.7839731.1510227/D=groups/S=1705005703:TM/Y=YAHOO/EXP=1123259675/A=2894361/R=0/SIG=13jmebhbo/*http://www.networkforgood.org/topics/education/digitaldivide/?source=YAHOO&cmpgn=GRP&RTP=http://groups.yahoo.com/">In
low income neighborhoods, 84% do not own computers. At Network for Good, help
bridge the Digital Divide!</a>.</font>
--------------------------------------------------------------------~->
Community email addresses:
Post message: [email protected]
Subscribe: [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
List owner: [EMAIL PROTECTED]
Shortcut URL to this page:
http://groups.yahoo.com/group/php-list
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/php-list/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/