does it need to have php editor?
Posted by: administrator (---.sympatico.ca)
Date: April 23, 2006 02:10PM

i copied a simple php test code from a website to a notebook . this is supposed to output the current date. I save it as test1.php then on my browser i typed in //localhost/test1.php but it says cannot find the page though i can run just //localhost. The test1.php was copied to www directory same as where the index.php is located. Does it need to have a php editor to create a PHP code? Please help. Thank you.

Options: ReplyQuote
Re: does it need to have php editor?
Posted by: nubianinja (66.110.110.---)
Date: April 23, 2006 03:43PM

If you have wamp installed create a folder in the www folder and place your test1.php inside it. Then rename test1.php to index.php You should see something.

You dont need a special php editor. You can edit in notepad aslong as yousave it as .php



Post Edited (04-23-06 16:21)

"The flesh is willing, but the mind .... Hey who'se potato chips are these!!?"

Options: ReplyQuote
Re: does it need to have php editor?
Posted by: administrator (---.sympatico.ca)
Date: April 24, 2006 02:28AM

thanks for the respond. I could do that but the thing is if i want to call another php code such as test1.php in my index.php - it will give me the same error again.

Options: ReplyQuote
Re: does it need to have php editor?
Posted by: CyberSpatium (---.hsd1.or.comcast.net)
Date: April 24, 2006 03:34AM

Use an include or require function in the top of your script to include your test1.php file. I prefer to use include_once and require_once myself, makes the php code more efficient.

include fuction:
[us3.php.net]

require function:
[us3.php.net]

include_once function:
[us3.php.net]

require_once function:
[us3.php.net]



Post Edited (04-24-06 03:58)

CyberSpatium
----------------------
WAMP Forum Admin

Web Development for Newbie's Blog - Check out my new blog. It is for web developers, and especially tailored for the web development newbie. If you are not fluent in “geek speak”, then this incredible resource is just you. And even if you are a web development pro, this is a great resource to check out some of the latest web development tips, news, tutorials, codes and more.

Options: ReplyQuote


Sorry, only registered users may post in this forum.