Computing.Net > Forums > Web Development > PHP and how to call it?

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

PHP and how to call it?

Reply to Message Icon

Name: boaster
Date: May 15, 2008 at 08:16:51 Pacific
OS: n/a
CPU/Ram: n/a
Product: n/a
Comment:

Where do I put my php scripts and then how do I refer to them in my code.

My web directory is public_html/website.
The page calling the script is public_html/website/happenings/happage.html

I put a php subdirectory under public_html as instructed by my web host but get a "script not found" error when I use any of the following as the script path for test.php:

test.php
../../php/test.php
public_html/website/php/test.php

If I move the .php file to the "happenigns" directory then I get a "no script directory found" error.

Thank you



Sponsored Link
Ads by Google

Response Number 1
Name: ShaqDiesel
Date: May 20, 2008 at 13:00:59 Pacific
Reply:

Assuming you're using apache, look in your server configuration file httpd.conf. Whatever you set your DocumentRoot as is where your php scripts should go. By default it should be your htdocs folder.

To refer to the php script, set the action attribute of your html form to the path of your php script.


0
Reply to Message Icon

Related Posts

See More


php wont work in hidden d... Directory Redirection



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Web Development Forum Home


Sponsored links

Ads by Google


Results for: PHP and how to call it?

How to protect PHP includes? www.computing.net/answers/webdevel/how-to-protect-php-includes/1029.html

ir4dex - what is it and how to fix? www.computing.net/answers/webdevel/ir4dex-what-is-it-and-how-to-fix/362.html

PHP and Mysql to create Auto-links www.computing.net/answers/webdevel/php-and-mysql-to-create-autolinks/522.html