c type includes

A

Anonymous

Guest
I want to thank you in advance for your help with my (probably obvious) question. Is there a way to use includes within the PHP code so that I can place functions in another file.

<?php

If(yes)
{
Calculate();
Display();
PromptResponse();
}

?>

Where Calculate(), Display(), and PromptResponse() code is actually written in another file (the include file).

Thank you for your help. I like to make pages as clean as possible, if I can move all functions to another file, I will be happy again. :lol:
 
I was able to pull in executable PHP code and have it run. Is there a way to select specific parts of an include file, or am I forced to pull in the complete file.

ie:
Test.php contains;

<?php

include 'TestInclude.php';

?>

The file TestInclude.php contains multiple functions, but I only want to bring in the function I need, not all. How can I accomplish this?
 
Using include, yes, the whole thing. Using fread() no, you can select line numbers.
 
Back
Top