Re: link vs file
- Date: Mon, 17 Dec 2018 13:43:58 -0800
- From: Jeffry Killen <jekillen@xxxxxxxxxxx>
- Subject: Re: link vs file
I did manage to figure out that link creates a hard link. And that I should have used
symlink() instead. But how would a hard link be detected?
> On Dec 17, 2018, at 1:27 PM, Jeffry Killen <jekillen@xxxxxxxxxxx> wrote:
> I am trying to get a feel for the difference
> between is_link and is_file.
> So I ran this code: the result is in comment block at the bottom
> if(link('index.php', 'indexLink') === false)
> print "link failed";
> $_linkRes = 'false';
> $_fileRes = 'false';
> $_linkRes = 'true';
> else if(is_file('indexLink'))
> $_fileRes = 'true';
> print 'indexLink: link; '.$_linkRes."<br>";
> print 'indexLink: file; '.$_fileRes;
> indexLink: link; false
> indexLink: file; true
> Why is it returning false for link and true for file?
> This is an apache/php v 5.3x installation on Mac Yosemite.
> Forgive my ignorance, but I have not worked with links up
> to this point. If I load http://localhost/indexLink I get a ton
> of raw code and some html rendered.
> Thank you for time and attention