September PHP-Scripts Blog Archives

How to find the location of php.ini on the server

Using the phpinfo() function you can easily find the location of the php.ini file on the server. Here’s the code to generate the phpinfo information pictured above:

<?php
phpinfo();
?>

Shown with the red arrows in the screenshot above:
#1 - this is the version of PHP
#2 - these are the configured library. For example ‘–with-mcrypt=/usr/lib’ means the mcrypt library […]

Technorati tag bookmarklet

Lestat from beginnercode.com was wondering about the code for the Technorati bookmarklet. Also, what are bookmarklets?
They are essentially snippets of JavaScript code that can be copy/pasted as links in your bookmark area. There is a site dedicated to them called bookmarklets.com which hasn’t been updated since 2002, but many of the bookmarklets still work. […]

Not using full image paths RSS problems

Tonight, while working with a new RSS aggregator in beta called SearchFox I noticed that some of our feeds wouldn’t add because of feed validation errors. On closer inspection I discovered it was because we are using relative links for some of our images. The feed will still validate using the Feed Validator but an […]

Showing most recent blog posts on non-Wordpress pages

Wordpress makes it easy to create a loop of recent posts to put on other PHP-enabled, non-Wordpress pages. For example, on the home page of this website (pictured above), I wanted to include the most recent post titles and related category links from this new blog. As new posts are added, they will flow to […]

Download PHP logos

PHP.net hosts numerous approved PHP logos including ICO files for desktop programs, PNG, GIF buttons, chicklets and more. These logos can be used even on commercial websites with the only requirement being that if the logo will be used for merchandising — for example, t-shirts with the PHP logo — licensing approval must be obtained […]

PHP Hello world!

Welcome to the PHP-scripts blog. Though I’m not a huge fan of ‘Hello World’ stuff, it seems that is where most things in the programming world start out. So here we go with examples using print and echo
Hello World using print statement

<?php
print ‘Hello World!’;
?>

Hello World using echo

<?php
echo ‘Hello World!’;
?>

What is the difference between […]