** کینگ کد : بزرگترین مرجع دانلود سورس کد های برنامه نویسی اندروید، ویندوز و جدید ترین اسکریپت های روز دنیا **
-----------------------------------------------
** سورس فروشگاه اینترنتی مارکیت فارسی برای اندروید - سورس فروشگاه اینترنتی موکتز فارسی برای اندروید **
-----------------------------------------------
** اسکریپت چیست؟ و چگونه از آن استفاده کنیم؟ (آموزش کامل نصب اسکریپت) **
-----------------------------------------------
** (160 جلسه) آموزش کامل و 0 تا 100 برنامه نویسی PHP **
-----------------------------------------------
** دانلود فیلم آموزشی فتوشاپ فارسی **
-----------------------------------------------
» بروزترین سایت ایرانی محصولات کدکنیون ( سایت /https://codemilo.ir )
» Cicool – Page, Form, Rest API and CRUD Generator
» KingArchitect | Property Portfolio & Real Estate React Template – No JQuery
» Sheltos – Real Estate React Next Js with Redux Toolkit , React Hooks & API Routes Template
» Acres – Real Estate React Template
» Mingrand – Real Estate React Template
» ChawkBazar – Elementor Lifestyle and Fashion Ecommerce Theme
» Streamit 3.0 | Video Streaming WordPress Theme + RTL
» MagicAI – OpenAI Content, Text, Image, Chat, Code Generator as SaaS
» PHP Form Generator – Codeigniter 4 Form Master, Form Header Detail, User Management, Multi-language
» بروزترین سایت ایرانی محصولات کدکنیون ( سایت /https://codemilo.ir )
» Cicool – Page, Form, Rest API and CRUD Generator
» KingArchitect | Property Portfolio & Real Estate React Template – No JQuery
» Sheltos – Real Estate React Next Js with Redux Toolkit , React Hooks & API Routes Template
» Acres – Real Estate React Template
» Mingrand – Real Estate React Template
» ChawkBazar – Elementor Lifestyle and Fashion Ecommerce Theme
» Streamit 3.0 | Video Streaming WordPress Theme + RTL
» MagicAI – OpenAI Content, Text, Image, Chat, Code Generator as SaaS
» PHP Form Generator – Codeigniter 4 Form Master, Form Header Detail, User Management, Multi-language
با استفاده از تابع basename در PHP ، می توانیم بخش آخر یک آدرس را به دست بیاوریم.
به مثال زیر توجه کنید :
1 2 3 4 5 |
<?php $path = "kingcode.ir/php-education/index.php"; $end_of_path = basename($path); echo $end_of_path; ?> |
نتیجه :
1 |
index.php |
اگر بخواهیم که پسوند .php نمایش داده نشود، باید کدها را به صورت زیر بنویسیم :
1 2 3 4 5 |
<?php $path = "kingcode.ir/php-education/index.php"; $end_of_path = basename($path,".php"); echo $end_of_path; ?> |
نتیجه :
1 |
index |
مثال )
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
<?php echo "1) ".basename("sctiptbaran.com/php-education/index.html"); echo "<br />"; echo "2) ".basename("kingcode.ir/php-education/index.html",".html"); echo "<br />"; echo "3) ".basename("kingcode.ir/php-education/index.html",".php"); echo "<br />"; echo "4) ".basename("kingcode.ir/php-education/index"); echo "<br />"; echo "5) ".basename("kingcode.ir/php-education/"); echo "<br />"; echo "6) ".basename("kingcode.ir"); echo "<br />"; echo "7) ".basename("."); echo "<br />"; echo "8) ".basename("/"); echo "<br />"; ?> |
نتیجه :
1 2 3 4 5 6 7 8 |
1) index.html 2) index 3) index.html 4) index 5) php-education 6) kingcode.ir 7) . 8) |