[TYPO3] In a PHP page, how to reference another PHP page?
Andreas Förthner
Andreas.Foerthner at netlogix.de
Mon Apr 24 19:28:10 CEST 2006
Bing Du schrieb:
> Ries van Twisk wrote:
>
>> Andreas Förthner wrote:
>>
>>> why don't you just include the first php files with
>>> require_once('php_file.php'); ?
>>> This seems to be too easy, I got you wrong, eh?
>>>
>>> Greets
>>>
>>> Andreas
>>>
>
> Yeah, if it's outside of typo3, I know how to include an external PHP
> file. In typo3, PHP content elements should be stored in the database.
> I'm not clear how to refer to them using file names.
>
>>>
>> or do you need to know from within your plugin to create links based
>> on page uid's?
>>
>
> Ok, here is what I want to do more specifically. I have created two PHP
> content elements which are in two different pages. Say, their page IDs
> are 111 and 222 respectively. The PHP code in page 111 does some
> database queries and publishes the query results in a certain format. In
> page 222, I want to run the PHP code in page 111 first. Yeah, it's like
> what 'include' does. 'include' can only accept a file name, right?
> Correct me if I'm wrong.
>
> Thanks,
>
> Bing
Hi,
of course you can just include a file. But the php is not stored in the
usually. How do you include your PHP script as a CE? If you have a PHP
script that does something, you will have it as a php file, don't you?
And this PHP file can be include in your second file. It doesn't matter
on which page this script is also included, important is, that it is
run. Sorry, I don't really see your problem, perhaps you could write us
your setup and how you included the php on your pages.
Greets
Andreas
More information about the TYPO3-english
mailing list