Have you ever came across a situation where you need to truncate the large text and show the "read more.." link to redirect user to read the full post ?
I know you might be searching for a function to show read more link in php.
Here is our simple function which can be used to show the "Read more.." links dynamically.
The above function can be used anywhere to show read more links with dynamic mysql queries.
How to use this function ???
Here is a simple example to do this
First you will need to create the connection with the database.
Connection settings are stored in "connect.php" file
This will output your article text with proper linking to original post with read more link.
Even you can customize the truncate function for more security check and customizing your display.
Share with friends if you liked it.
PHP scripts and programs for Beginner to Master php programs, php ready to use scripts & functions, css tutorials, html, javascripts, ajax examples for Beginner to Master
Kamis, 29 Oktober 2009
Minggu, 25 Oktober 2009
How to create and execute, run php file on windows
So you installed WampServer on Windows.
Save the file to the directory mytest as index.php
Now click on the icon present in the right hand side of your taskbar and then click on localhost
Now you will see the list of projects, then click on mytest, you can see that your program is executed.
It will show you all the details of the php version you have installed.
Now how to create and execute or run you php file on windows ???
First START WampServer by clicking your START MENU and then selecting WampServer and then click start WampServer.
Once Server is started then you will see a WampServer icon in the right corner of your taskbar where your clock is present.
Now open the drive where you installed your wampserver.(ex. C:/wamp/)
Then open the www folder. (ex. C:/wamp/www/)
This is your Base directory, your all projects will come here.
Now create a directory here named mytest.
Now open notepad or any other text editor you have. Type the following in it.
Save the file to the directory mytest as index.php
Now click on the icon present in the right hand side of your taskbar and then click on localhost
Now you will see the list of projects, then click on mytest, you can see that your program is executed.
It will show you all the details of the php version you have installed.
Sabtu, 24 Oktober 2009
How to use PHP on Windows - WampServer
Many of us use windows operating system and want to know how to use php on Windows operating system ?
For this there is a very simple and useful solution. Even you don't have to setup & configure many things.
Following things are required for using php on windows
For this there is a very simple and useful solution. Even you don't have to setup & configure many things.
Following things are required for using php on windows
- Apache Server
- Mysql
- PHP
WampServer is a Windows web development environment. With this we can create web applications with Apache, PHP and the MySQL database. Even PHPMyAdmin is provided to manage your databases.
Just Download WampServer and install it and you are done. WampServer is an open source project, free to use.
Once Installation is complete then click here to know how to create and execute(run) a php file on windows.
Jumat, 23 Oktober 2009
Share your blog links, blogs, websites
Hi Friends, programming-in-php.blogspot.com is a place to share experience and knowledge.
You can Help us to spread the word either by forwarding this URL or putting this on your blog or website.
Even I am thinking of putting a section which will list the useful resources for programming, so if you have a blog or website which is related to php, php codes, php scripts, ajax, css, html,open source or if its technical blog then please contact me by writing a comment here about your blog, i will definitely like to add your link here on my blog.
Because to share our knowledge it has to be accessible to other many people. So lets help each other to share knowledge.
We all can have a section on our blog or website to share some useful resources which also helps in link building & SEO(Search Engine Optimization) and promotion.
Your comments are always welcome about this idea, whether is good or bad.
I am waiting for your reply.
Thank you.
Jumat, 16 Oktober 2009
New version 6.0.4 of PHP DataGrid
The new version 6.0.4 of PHP DataGrid is available now for downloading. There are many bugs fixed and also some new additions and improvements, like improved scrolling and multi-row editing. This version requires full re-installation, if you work with one of previous. Read carefully Getting Started. Here the main additions and improvements:* Feature: [added] non-documented attribute for fields
Jumat, 09 Oktober 2009
New version 3.0.3 PHP AdminPanel Pro
The new version 3.0.3 of PHP AdminPanel Pro is available now for downloading. There are many bugs fixed and also Many NEW additions and improvements. This version requires full re-installation, if you work with one of previous. All recent changes can be viewed here.
Check here our Tour and Screenshots!
And new DataGrid Pages Wizard Online DEMO
The Features:
• One-Year FREE Updates
•
Rabu, 07 Oktober 2009
Send Feedback or contact via mail function in php
At many places we require the contact us or feedback form to get some input from the user or to get some feedback from the user.
Today i will be showing you how to create a very simple feedback form or contact us form in php with the mail function and without any database.
1) First we will be creating a simple form to accept the user input like name, email and their message or feedback or query.
2) In the form tag we have not specified any action part and we kept action="" in the form tag, so when the form is submitted at that time it will call itself.
So on submit we will execute our code to send the mail.
Today i will be showing you how to create a very simple feedback form or contact us form in php with the mail function and without any database.
1) First we will be creating a simple form to accept the user input like name, email and their message or feedback or query.
2) In the form tag we have not specified any action part and we kept action="" in the form tag, so when the form is submitted at that time it will call itself.
So on submit we will execute our code to send the mail.
Selasa, 06 Oktober 2009
get current working directory in php - simple function
sometimes it is required to get the current working directory of the script.
so to get the current working directory in php this is a small function.
so to get the current working directory in php this is a small function.
Langganan:
Postingan (Atom)