Hello, is there a way that I can use the command use in php like I can in perl?
Example:Please reply, and if there isn't a way, please tell me so.PHP Code:<?php
use file;
echo $file::$foo;
?>
Hello, is there a way that I can use the command use in php like I can in perl?
Example:Please reply, and if there isn't a way, please tell me so.PHP Code:<?php
use file;
echo $file::$foo;
?>
Last edited by mindos4; 03-31-2010 at 09:35 PM.
In PHP, you use include, include_once, require or require_once. However, PHP doesn't have packages as Perl does. Read the PHP manual pages or search the web for more.
Last edited by misson; 04-01-2010 at 05:43 AM.
Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.Misson, not Mission.