You are here: Re: How to call a PHP script by using something like a shortcut « All PHP « IT news, forums, messages
Re: How to call a PHP script by using something like a shortcut

Posted by Wendy Cunningham on 12/08/05 22:34

> include_once("/full/path/to/my/script.php");

I really think you should explain the options here.

You can use include(); to include another file.
You can use include_once(); to include another file, but only once.
You can use require(); to include a file and require it's inclusion, if the
file cannot be included, it will exit the script.
You can use require_once(); to include a file like above, but only once.
Note: parenthasis (the brackets) are not required for any of these
functions.

Examples:
include 'path/to/script';
include_once 'path/to/script';
require 'path/to/script';
require_once 'path/to/script';

Simple :)

"J.O. Aho" <user@example.net> wrote in message
news:3vqurlF15hhecU2@individual.net...
> Stefan Mueller wrote:
> > I've several virtual directories (folders). In each virtual directory
I've
> > several PHP scripts. Some of them are the same. Therefore I have the
same
> > code several times on my server.
> > e.g.
> > http://www.myserver.com/task1/collect_data.php
> > http://www.myserver.com/task2/collect_data.php
> >
> > My goal is to have each script only once and to use something like a
> > shortcut instead.
> >
> > e.g.
> > http://www.myserver.com/task1/shortcut_collect_data.php
> > http://www.myserver.com/task2/shortcut_collect_data.php
> >
> > However, a windows shortcut is not working.
>
> No, you need a real symlink to get that to work, but this isn't supported
by
> Microsoft.
>
>
> > Is there a way to call another PHP script from a PHP script?
>
> include_once("/full/path/to/my/script.php");
>
>
> //Aho

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация