Posté par
Office23, le Friday February 22, 2008 06:39:10 AMConfiguration: Windows XP Internet Explorer 6.0
Hello Office23,
You can use the set_include_path or set_require_path. i tried this before.. Visit www.php.net for more information |
Hi office23, welcome to the forum..
You can also make a test.. make two page, one named test1.php and another one name test2.php. Put test2.php in the root folder and test1.php in a folder called test! in test1.php just type <?php echo "Hello "; include "test2.php"; ?> in test2.php just type <?php echo "World"; ?> Then open test1.php. You should get Hello world on the page |
office23, you should specify that you are using php as your programming language in your thread title. Otherwise people won't be able to determine if you're talking about it. The warning message you got from php already told you the error.
include_path='.;c:\php4\pear'. <--- that's the actual error in your php.ini setting, just change it from the location you want to include your file. Hope that makes sense. Try it and tell me if it works. |
Hi Htmlgirl, i tried using the set_include_path but i don't really understand it. How should I apply this code in my actual code? It's for a project I'm working on and the deadline is three days. |
According to that error message, you can only include files that are in the same directory(folder) as your script or in c:\php4\pear unless you change it from your php.ini as mentioned by Jamescracker. If you don't have access to php.ini, just ask your host provider to change it or just put the file that you need to include in the same directory. As long as it doesn't affect your script, it's fine. |
I solved this using the code:
require_once ( $_SERVER['DOCUMENT_ROOT'].'/test.php' ); |
hi office 23,i have the same problem and i have solve it by using the ;set_include_path or set_require_path. it really solved the problem automatically.try it and you will be alright;-] |
| 07/03 14h02 | Windows NT 3.51 Server wont logon | 1 |
| 21/04 21h21 | Will a isa nic work with windows 2003 server | 0 |
| 12/03 00h54 | Downgrade Win 2008 Server to 2003 Server | 7 |
| 11/03 20h30 | Double-boot a Win 2003 server box | 2 |
![]() | Avira AntiVir Personal free for Windows - Avira AntiVir PersonalEdition Classic is a very good and free antivirus which reliably protects your private computer... | Category: Antivirus License: Freeware/gratuit |
![]() | Windows Live Messenger - Windows Live Messenger is the next-generation MSN Messenger. It has everything you already love about Messenger—your... | Category: Instant messaging License: Freeware/gratuit |
![]() | FileZilla Server - FileZilla Server is an FTP server supports FTP and FTP over SSL/TLS. | Category: FTP License: Open Source |
![]() | Opera for Windows - Possibilty to download a version compatible with Linux, MacOS, Solaris, FreeBSD ... <h2> </h2> The Opera Web browser... | Category: Browser License: Freeware/gratuit |