Kind regards,
Justin.
P.S. WOW, this is a late response...sorry.
-Original Message-
From: John W. Holmes [mailto:[EMAIL PROTECTED]
Sent: Saturday, April 17, 2004 12:20 PM
To: Pooya Eslami
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] why doesn't this work ?
Pooya Eslami wrote:
>
Okay, what you can do is try use an .htaccess file (providing your host
allows them) to make the PHP engine parse .html files.
Create a file titled ".htaccess" with the following contents:
AddType application/x-httpd-php .php .php3 .html .htm
Upload it to the same folder that the .html file is in
> Why cannot I embed php in html files?
I'm relatively new to PHP, but I am fairly sure that it is
possible to have PHP embedded in .html files, as my web hosting service
accomplishes exactly that. I believe it's just some kind of setting in
Apache or somewhere else that you or your web ho
The web server is set up to see the .php file extension and pass the entire page to
the PHP engine for processing. Then the web server passes the
results back to the client's browser ( HTML, text, and images).
>>Yes, the server supports php, and I don't want to make it into a php file
>>beca
You have this as a xxx.php file right?
It has to have a .php extension for it to work.
>>I put this in the body of an html file:
>>
>>>if ($handle = opendir('.')) {
>> while (false !== ($file = readdir($handle))) {
>> if ($file != "." && $file != ".." && eregi('\.html$', $file)) {
>>
Pooya Eslami wrote:
Yes, the server supports php, and I don't want to make it into a php file
because its a big html file and I just need this little script on it. Why
cannot I embed php in html files?
The server does not parse html files for php so that it does not waste
CPU on parsing files that
On Sun, 2004-04-18 at 10:27, Pooya Eslami wrote:
> Yes, the server supports php, and I don't want to make it into a php file
> because its a big html file and I just need this little script on it. Why
> cannot I embed php in html files?
You CAN embed PHP in .html files PROVIDED THAT YOUR WEBSERVER
Yes, the server supports php, and I don't want to make it into a php file
because its a big html file and I just need this little script on it. Why
cannot I embed php in html files?
"Andy Ladouceur" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> It's already been mentioned, but you
It's already been mentioned, but you do need to ensure you are using a
.php extension on the file. Also, forgive me if this has already been
covered, but are you sure the server even supports PHP?
Try creating a new file with:
And save it as something.php, check and see if it returns a table fu
I put this in the body of an html file:
$file";
}
}
closedir($handle);
}
echo "";
?>
the output page contains :
$file
"; } } closedir($handle); } echo "
"; ?>
I don't understand why.
"Daniel Clark" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Can you post the cod
Can you post the code and error.
>>I took out the scrip tags and put in at the
>>end, but it returns this:
>>
>>$file
>>"; } } closedir($handle); } echo "
>>"; ?>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Pooya Eslami wrote:
I took out the scrip tags and put in at the
end, but it returns this:
$file
"; } } closedir($handle); } echo "
"; ?>
Any ideas how to fix this?
Use a .php extension on your file. Or you can ask your hosting company
to have .html files processed as PHP, but they won't.
--
--
I took out the scrip tags and put in at the
end, but it returns this:
$file
"; } } closedir($handle); } echo "
"; ?>
Any ideas how to fix this?
"John W. Holmes" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Daniel Clark wrote:
>
> > I should have also said:
> >
> > Because it'
Daniel Clark wrote:
I should have also said:
Because it's missing the tags, the
> web server isn't going to run the code, but pass
> it back to the client browser.
You are right, but not for the reason you think.
I took out the scrip tags and put in at the
end, but it returns this:
$file
"; } } closedir($handle); } echo "
"; ?>
Any ideas how to fix this?
"Daniel Clark" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I should have also said:
>
> Because it's missing the tags, the web ser
I should have also said:
Because it's missing the tags, the web server isn't going to run the
code, but pass it back to the client browser.
>>If I put the following script in a .php file it would work but if I put it
>>in an .html file doesn't work, why? script tag is only used in .html file.
The browser doesn't know what to do with PHP code.
>>If I put the following script in a .php file it would work but if I put it
>>in an .html file doesn't work, why? script tag is only used in .html file.
>>
>>
>>echo "";
>>if ($handle = opendir('.')) {
>> while (false !== ($file = readdir(
How do I do that? I don't have a webserver, it is hosted by a hosting
company.
"John W. Holmes" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Pooya Eslami wrote:
> > If I put the following script in a .php file it would work but if I put
it
> > in an .html file doesn't work, why?
Pooya Eslami wrote:
If I put the following script in a .php file it would work but if I put it
in an .html file doesn't work, why? script tag is only used in .html file.
You web server determines whether or not to look for PHP in a file based
upon its extension. You must set up your web server to
<[EMAIL PROTECTED]>
Sent: Tuesday, November 27, 2001 4:39 PM
Subject: Re: [PHP] Why doesn't this work? HTTP_USER_AGENT
This is interesting. I did my testing in Opera 5.05 and it fails to display
the page correctly. I then opened Netscape 6.2 and it works fine. Must be a
problem with Ope
This is interesting. I did my testing in Opera 5.05 and it fails to display
the page correctly. I then opened Netscape 6.2 and it works fine. Must be a
problem with Opera. I also set Opera to identify itself as Netscape and it
still failed to load the page.
Thanks for the assistance.
Chip
On M
On Tue, 27 Nov 2001 17:43, Craig Vincent wrote:
>
> What have I done wrong in such a simple bit of code?
> -
>
>
> $browser = $HTTP_USER_AGENT;
> $ip = $REMOTE_ADDR ;
> $db = mysql_connect ( "localhost" , "username" , "password" );
> mysql_select_db ( "database" , $db )
What have I done wrong in such a simple bit of code?
-
Howdy
I copy & pasted your code onto a test HTML page and modified the mysql
commands to appropriately connect to my MySQL server. There was absolutely
no problem with this code
> print split("=",$testString)[0];
First, using split() on such a simple delimiter is a waste. Use
explode(). And yes, PHP does not support automatic dereferencing of
returned arrays like that.
-Rasmus
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTE
php doesn't have as loose a syntax as perl or python. try this:
mind you, that only works because you wanted the 0th element, and shift
returns that first one...something else would be needed for any other
index...
jack
-Original Message-
From: Ray Van Dolson [mailto:[EMAIL PROTECTED]
> -Original Message-
> From: chip [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 05, 2001 11:37 AM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: [PHP] Why doesn't this work? Please trouble-shoot my
> script.
>
>
> I tried your suggestion
eir home."
--Ken Olson, president, chairman and founder of Digital Equipment
Corp., 1977
(-- Then why do I have nine? Somebody help me!)
Please respond to [EMAIL PROTECTED]
To: Chip Wiegand
cc:
Subject: Re: [PHP] Why doesn't this work? Please trouble-shoot my
script.
On Mond
27 matches
Mail list logo