#php
15 posts tagged php. Clear filter
-
Apache Rewrite Rule for Mapping to index.php in Sub Folders
Below is an example URL structure with rewrite rules using an Apache .htaccess file. GET /a/ = a/index.php GET /a/b/ = a/b/index.php GET /a/b/c/ = a/b/index.php This URL mapping will give you...
-
Regex for Extracting URLs in Plain Text
Here is a Regex for extracting URLs from text. However, these links will not already be hyperlinked or source attribtues from images or iframes. This example is in PHP. I was trying to format a...
-
I Just Published My First PHP Package HTMLXPATH
I just wrote and published my first PHP package on Packagist.com. It's available on packagist.org and the source code is on github. To install the package use composer composer require...
-
How To Increase or Change the File Upload Size in the PHP ini file for Wordpress
You need to find which configuration ini file has been loaded by PHP. The easiest way to do this is to run the phpinfo() function from the command line. You should see something like "Loaded...
-
Deploying Wordpress on Heroku
\ This post is out of date - Heroku officially supports PHP now w/ buildpacks Heroku runs Apache version 2.2.22 PHP version 5.3.10 Deploying Wordpress to Heroku requires that you throw the...
-
How to Check if the Current Logged In User can Edit a Course in MOODLE Using the Has_capability Function
After an hour of fruitless searching through the docs and forums, I finally found an answer to my simple question, of course buried in the depths of the shark infested, murky water that is the...
-
Moodle's Most Important Function Gets No Attention
Arguably the most important function in the Moodle API, is the create\course function. One would think... after all Moodle is an LMS. Courses are the bread and butter for course management...
-
Convert Array to Object in PHP
Source: http://www.serversidemagazine.com/php/how-to-convert-array-notation-to-object-notation
-
My Review of Moodle 1.9 Extension Development
I wrote a review for Joseph Thibault's Moodle News on extension development for Moodle. The book is quite good and I think an essential resource for anyone wanting to develop in Moodle. The book...
-
Install and Serve a Rails Application from PHP Subdirectory Using Apache, Phussion Passenger and Ruby Enterprise Edition
Here is how to install a Rails application out of a subdirectory (rather than as a subdomain) with the Apache web server(Apache2). In this example I'm going to use my own blog which is a Wordpress...
-
Using the PHP Mail Function with Additional Headers
Pass a fourth parameter to the mail() function with the header information.
-
Generate MySQL Datetime Type Using PHP Date() Function
If you want to insert a datetime that matches the default mysql datetime type format use this
-
PHP Paypal IPN Script
Simple script for posting a valid response back to Paypal service after a sale is completed using the Paypal Instant Checkout payment method. I grabbed this script from Paypal Docs... I never can...
-
Listing Files and Directories with PHP
Listing all files and directories using PHP 5.
-
Highlight String in PHP
Function for highlighting text/strings in PHP. Will output something like this [caption id="" align="alignnone" width="345" caption="Highlighted PHP.Net"] [/caption] \\\Notice all the styles are...