View Full Version : What's going on?
jalal
01-27-2002, 01:36 PM
Excuse me but I really don't understand what is wrong with my php file? I upload the following file in public_html:
----------------------
<html>
<head>
<title>Exemple</title>
</head>
<body>
<?php
echo ("Hi, I am a PHP script!");
?>
</body>
</html>
-------------------
and I chmoded it 777 and I made sure public_html was also 777 but I get nothing on the screen when I visit the file from the web!! Can you please tell me what is wrong with this!!!
Thank you for your cooperation
Gerry
01-27-2002, 03:33 PM
My guess is that you didn't give the file a ".php" file extension.
You shouldn't have to CHMOD to get it to run; just upload to your public_html folder as "hello.php" and it should be fine.
jalal
01-27-2002, 07:46 PM
Go the the URL www.almaarifa.net/jalaltrial.php and view the source! You'll be surprised!
Thank u anyway for your answer.
It would be nice if somebody can tell me what is wrong!
alan92rttt
01-27-2002, 09:49 PM
My bet is that your .htaccess file is messed up and apache is not calling the PHP preprocessor for your page.
Gerry
01-27-2002, 10:02 PM
Get rid of the junk characters before the <html> tag, and get rid of all the extra spaces in the HTML and PHP tags. The PHP processor probably doesn't recognize < ? p h p ...
If you cut and paste the code exactly as shown in your first post, and make sure you upload in ASCII (not binary) mode, it will probably work fine.
fanchon
01-31-2002, 11:47 AM
Try this one :
<?php
include ( " jalaltrial.php " ) ;
?>
Fanchon:)
SpyTech
02-04-2002, 06:33 PM
Also remember that PHP does not require CHMOD.. Unless you are using PHP to upload a file or write to a file. So no need to CHMOD unlike CGI.
vBulletin® v3.7.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.