- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
is_link() function in PHP
The is_link() function checks whether a file is a symbolic link or not. It returns TRUE, if the file exists and is a symbolic link. On failure, it returns FALSE.
Syntax
is_link(file_path)
Parameters
file_path − The file to check
Return
The is_link() function returns TRUE, if the file exists and is a symbolic link. On failure, it returns FALSE.
Example
<?php $mylink = "new"; if(is_link($mylink)) { echo ("link"); } else { echo ("not a link"); } ?>
Output
not a link
Let us see another example.
Example
<?php $mylink = "documents"; if(is_link($mylink)) { echo ("link"); } else { echo ("not a link"); } ?>
Output
not a link
Advertisements