How to set 777 permission on a particular folder?

777 is a permission in Unix based system with full read/write/execute permission to owner, group and everyone.. in general we give this permission to assets which are not much needed to be hidden from public on a web server, for example images.. You said I am using windows 7. if that means that your web server is Windows …

Read more

Categories PHP

Chatbot in C Program

If you want to create a chatbot/auto replay system use the c program just use this code: Copy below code and save use extension .c. example, filename.c. I am using if-else and goto conditions. also use strcmp() function to compare two strings. C program auto replay chatbot Screen Shoot: You can also use this code …

Read more

Categories C

Count Total Code Lines in Project Using Sublime Text Editor

Go to Menu or Right Click The Project Directory:Find -> Find in Files (windows: ctrl+shift+f) Switch on the reg_ex button (windows: alt+r) Find: ^.\S+.$ Where: c:\your_folder\,.php,.js,.inc,.html,.htm,.scss, -/folder_to_exclude/, -*.min.js Then click on the Find button Be careful to not click on Replace!!!On the bottom line of your search result you’ll find something like:7061 matches across 154 …

Read more

Save Array in MySQL Database

You can store the array using serialize/unserialize. With that solution they cannot easily be used from other programming languages, so you may consider using json_encode/json_decode instead (which gives you a widely supported format). Avoid using implode/explode for this since you’ll probably end up with bugs or security flaws. To convert an array (or any object) into a string using PHP, call the …

Read more

Categories PHP

Subtract 1 Week with PHP

For Subtract 1 week use this code: Please replace your date with ‘2012-12-12‘. You Can Also Use This Code for Subtract 1 Week: Please replace your date with ‘2012-12-12‘.

Categories PHP

Subtract day with PHP

For Subtract 1 day use this code: please replace your date with ‘2012-12-12‘. For Subtract 7 days use this code: please replace your date with ‘2012-12-12‘. For Subtract 30 days use this code: please replace your date with ‘2012-12-12‘.

Categories PHP