HomeMonday, July 23, 2018, 11:30:39
2

Syntax highlighting in Smarty

Monday, February 9, 15, 03:08:08, 4 Yaers Ago Via wain, Hits: 6268
Syntax highlighting for Smarty - Google Code Prettify
file.php
Code:
<?php
include ('libs/Smarty.class.php');
$smarty = new smarty();
$smarty->template_dir = 'themes/classic';
$smarty->compile_dir = 'temp/templates_c';
$smarty->config_dir = 'temp/config';
$smarty->cache_dir = 'temp/cache';
$highlight = '
class Voila {
public:
// Voila
static const string VOILA = "Voila";
// will not interfere with embedded tags.
}
';
$smarty->assign('highlight', $highlight);
$smarty->display('file.php');
?>


template/file.php
Code:
<head>
<link href="scripts/prettify.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="scripts/prettify.js"></script>
</head>
<body onload="prettyPrint()">
<pre class="prettyprint">{$highlight}</pre>
</body>

Sign In

Sponsor
Related

PHP filesize

The filesize function returns the size of the specified file.

PHP Fwrite : fwrite

php write to file - how to write data to a file using the php frwite function

Creating a CAPTCHA with PHP :: PHP Tutorial

Captcha Image, This tutorial will show you how to create a form with Captcha.

Link Base 2.0.

Manage your links using a MySQL database. It features easy install, user submission, and an admin panel to add, edit and remove categories and links.

Site Recommendation

This script will allow your visitors to recommend your site to their friends.

PHP Links Script 1.1.

This script allows you to manage your links using a MySQL database. It features easy install, user submission, and an admin panel to add, edit and remove categories and links. The script is easy to customize to suit your needs.

Captcha V1 - Free PHP Script

An anti-spam form protection image written in PHP, Version: 1.1.

Advanced Contact Form - PHP Script

Advanced Contact Form with email and form field validation. Features: HTML Output(Response), Captcha Image.

Imageline

Draws a line between the two given points.
About Author

wain

Date Registered: Sun, Feb 8, 15
Last Time Online: Sun, Mar 18, 18
So far has created 115 entries.
wain
This author has not yet filled in any details.