View Full Version : more strange phpdev results

06-20-2005, 12:50 AM
when using phpdev423, I create a page that has php in it, I name it with an .html extension the script doesnt run, I name it with a .php extension it does run. Is there a setting somewherer in php.ini that I need to set?

also, when using $REQUEST_URI I get back the following string
is there a way to strip the '/' from the front of it?

thanks. Hope all you dads had a great Fathers Day, I did.

nevermind about the send question trim does the job just like it is supposed to.

06-20-2005, 01:09 AM
Apache must know which files are supposet do be parse by php. Yolu have to edit apache's .conf file.

06-20-2005, 01:36 AM
any idea what the line would say to notify apache to parse php?

06-20-2005, 02:08 AM
your apache config file:

AddType application/x-httpd-php .php .html

I don't really recommend using .html as a php parsed extension, mearly for compatibility. If you want to select a similar ending, I'd recommend phtml or pml. Lol, pml.
If you do not have access to your apache config file you may also create this within a .htaccess file.
I believe it would be done like so:

<ifModule mod_mime.c>
AddType application/x-http-php .php .html

I recommend you access $REQUEST_URI via the $_SERVER superglobal as well, $_SERVER['REQUEST_URI']. To strip out the character you can look at using the basename function as well.