By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,686 Members | 1,903 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,686 IT Pros & Developers. It's quick & easy.

about include() function.

P: 1
Include fuction doesn't work properly.I wanted to include a certain webpage in my web homepage using include() but is not working for me instead the function does display the informantion I need in different blank page but not in the home page.The syntex is correct(<?php include('myFile.php')) but what might be the problem?
Apr 23 '10 #1
Share this Question
Share on Google+
3 Replies


Dheeraj Joshi
Expert 100+
P: 1,123
Expand|Select|Wrap|Line Numbers
  1. <?php include 'myFile.php' 
  2.  
  3. // code goes here
  4.  
  5. ?>
  6.  
This is how i use to include php files once up on a time. I am not sure about usage of parenthesis in include statement.
This may work. :)

Regards
Dheeraj Joshi
Apr 23 '10 #2

Atli
Expert 5K+
P: 5,058
Hey.

Keep in mind that the include keyword simply imports the code within the target file into the current document and executes it there.

Beyond that, I would need to know more about what you are doing and what is happening to be able to offer anything more useful.
Apr 23 '10 #3

100+
P: 384
If your trying to include a page from another server by default 'allow_url_include' is disabled, I would strongly advise against you enabling this feature as it can open the server to a flood of security issues.
Apr 23 '10 #4

Post your reply

Sign in to post your reply or Sign up for a free account.