About Joys of Programming

  • Website: or email
  • Biography: Joys of Programming is an attempt to bring to the readers the simple tricks of programming, making their programming life easier

Posts by Joys of Programming:

 
0

PHP: How to set the value of the include_path: set_include_path

on in PHP

Various functions in PHP have options to search for files in a fixed set of directories often known as include_path. When you include another PHP file in another PHP program, the interpreter searches for the file in the directories mentioned in the include_path and reports an error if not found. The include_path value can be overwritten by a program. But it is better to extend the current value and add more directories. The following program does that. It gets the current value and extends the new value. Note the use of the PATH_SEPARATOR, which is a variable to signify the separator between two directories.

<?php
print get_include_path()."\n";
$path = "../../config";
set_include_path(get_include_path().PATH_SEPARATOR.$path);
print get_include_path()."\n";
?>

The output of the program is as follows

$php value.php
.:/usr/share/pear:/usr/share/php
.:/usr/share/pear:/usr/share/php:../../config

Tags: ,

 
0

PHP: How to get the value of the include_path: get_include_path

on in PHP

Various functions in PHP have options to search for files in a fixed set of directories often known as include_path. When you include another PHP file in another PHP program, the interpreter searches for the file in the directories mentioned in the include_path and reports an error if not found. The include_path value can be [...]

 
0

PHP: How to get the default value of the include_path: get_include_path

on in PHP

Various functions in PHP have options to search for files in a fixed set of directories often known as include_path. When you include another PHP file in another PHP program, the interpreter searches for the file in the directories mentioned in the include_path and reports an error if not found. The include_path value can be [...]

 
0

Git: How to recursively add the files in a directory

If you are working with Git and want to add a new file or directory, follow the following steps Go to the directory where your files are located. Now you must commit these changes (You can give necessary comments) If you want to add a directory and all the files which are located inside it [...]

 
0

Git: How to add new files and directories?

If you are working with Git and want to add a new file or directory, follow the following steps Go to the directory where your file is located. Now you must commit these changes (You can give necessary comments) If you want to add a directory, Go to the directory where the directory you want [...]

 
1

How to create basic slides using Beamer Latex?

on in Latex

With beamer, you can create slides for your presentation. Her we present a simple template for creating a presentation. Let’s name the file simple.tex. Let’s see every line in detail Here we are including the package beamer into our file. Running this single line will not generate any pdf file Now let’s add more lines [...]

 
0

Beamer/LaTeX Tutorial

on in dpkg, Red Hat, Ubuntu

LaTeX is commonly used to prepare documents. It is commonly used for the scientific documentation because it is very useful to create documents with lots of mathematical symbols and notations. For some time, Beamer is used by the scientific community for preparing slides for a presentation. Beamer has features to describe slides and the transition. [...]

Copyright © 2009-2012 Joys of Programming All rights reserved.
Desk Mess Mirrored v1.8.1 theme from BuyNowShop.com.