This is a discussion on "Please HELP!!" within the PHP Forum section. This forum, and the thread "Please HELP!! are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Please HELP!!
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
OK I am working on a live flash chat room. But am having a problem with this one part. I know this is really easy so please help. Here is the code...
Last edited by JacobHaug; Aug 30th, 2006 at 06:20. |
|
|
|
#2
|
||||
|
||||
|
Re: Please HELP!!
Thats weird....
If it's showing both images, then I can only assume the php is not being parsed at all..... Try putting all the php code in one block and using print statements to output everything. with just one php block, you should be able to track the flow of code a lot easier in and out of the conditional statements..... To be honest, everything looks ok to me sematically, but like I said, it's almost like the PHP isnt being processed.
__________________
Click the 'Thanks!' button if this post has helped you Rob - Webforumz Founder
Last Blog Entry: Creative Labs threaten developer over home made drivers.... (Apr 1st, 2008)
|
|
#3
|
|||
|
|||
|
Here look at these pages...
Working Example http://support.jbwebsitesolutions.com/ Failed Example Shows Both Images http://www.jbwebsitesolutions.com/ht...est_index.html PHP Version Does Something Different http://www.jbwebsitesolutions.com/ht...test_index.php I need the working example to be working in the html page i have above. I have no ideal why it does not work. I made it a php page incause that was the problem still it did not work. I am stuck. Also the pages above will not work in IE. Don't try it nothing will happen. Must use Firefox or Netscape. |
|
#4
|
|||
|
|||
|
Re: Please HELP!!
The PHP source code is coming through in your .html version; quite simply, the PHP isn't being parsed.
If you add AddType application/x-httpd-php .html to your .htaccess file, then that should cure that problem at least. Note - that's assuming that you're allowed overrides of this sort ... and that an alternative would be to do the same thing in your main Apache configuration file |
|
#5
|
|||
|
|||
|
I don't understand. It does not work in the PHP version either.
http://www.jbwebsitesolutions.com/ht...test_index.php You said, "the PHP isn't being parsed" what do you mean i do not understand. |
|
#6
|
|||
|
|||
|
Re: Please HELP!!
PHP is parsed to HTML or should be. if you can see the PHP code in the generated source something is wrong.
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
|
|
#7
|
|||
|
|||
|
Ok cool!! That makes since. Now i do not have a .htaccess file like she said. Or at least i don't think i do. Where can i put this code.
|
|
#8
|
|||
|
|||
|
Re: Please HELP!!
You just have to edit the .htaccess file and add that line. You can always make a new .htaccess file if needed.
http://www.he.net/faq/mime_types.html
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
|
|
#9
|
|||
|
|||
|
OK great the problem is fixed. But new problem has occurred. PHP says I am offline but really I am online? Any ideals of what could be wrong?
PHP Page that works... http://support.jbwebsitesolutions.com/ HTML Page that is Stupid... http://www.jbwebsitesolutions.com/ht...est_index.html PLEASE HELP!! |
|
#10
|
|||
|
|||
|
Re: Please HELP!!
OK guys & gals I am online please take a look and let me know what you think I should do to the code to make it work in the HTML page. Works in PHP just not HTML.
|
|
#11
|
|||
|
|||
|
OK i found out what the problem is. Somewhere in my code i have not linked to the full URL. Because it is in a seprate dirctionary it should have a full URL link. But the problem is i do not see where i am missing this. Here is the code.
|
|
#12
|
|||
|
|||
|
Re: Please HELP!!
Are you allowing remote access to require_once? There's a security issues about requiring files from other servers / with full URLs, and I would advise you to use a relatibe path not an http:// URL for this.
i.e require_once("../Flashchat/inc/common.php"); (or with another ../ in the front if you're another directory down) For further information about the remote access issues in require_once, see http://uk.php.net/manual/en/ref.file...llow-url-fopen |
|
#13
|
|||
|
|||
|
Re: Please HELP!!
YOU ROCK GRAHAME!!! THANK YOU SO MUCH!! Using a relative path worked great i would of never thought to do that. But it worked!! Thanks!!
|
![]() |
| Tags |
| help |
| Thread Tools | |
|
|