Jump to content

Recommended Posts

I know this is going to sound like a stupid question, but I\'ve lost too much sleep and I\'m going crazy. I have downloaded alot of php scripts that I would like to incorporate into my websites. I use Dreamweaver MX. I\'m a bit confused on how and where to put the script. Do you have to set up a seperate php site or do you just paste it into your site and upload it to the server and then it will work? Please help!!!!!!!!!!!!!!!!![php:1:5915f2b6cc]<?php

?>[/php:1:5915f2b6cc]

Link to comment
https://forums.phpfreaks.com/topic/1218-dreamweaver/
Share on other sites

Hi, Lora007 ---

 

Make a page in notepad or your favorite text editor, exactly like this:[php:1:736746cfd6]<?php

echo \"Hello, Lora!!!\";

?>[/php:1:736746cfd6]

 

or, like this:[php:1:736746cfd6]<?php

phpinfo();

?>[/php:1:736746cfd6]

 

name it \"test.php\" ...and upload it to your site. Look at it in your browser. If it says \"Hello, Lora!!!\" (in the 1st case) or has a big white/purple page with lots of technobabble on it (in the second case) then you can use PHP on your site.

 

Then, do this: rename the test.php file to \"test.html\" and load it into the browser. If it works the same way as it did in the first test, you can then embed PHP script into your standard HTML pages. If it doesn\'t, then your pages will have to be \"pagename.php\" in order to work.

Link to comment
https://forums.phpfreaks.com/topic/1218-dreamweaver/#findComment-4077
Share on other sites

Ok, I appreciate the help, but I guess I need a bit more. I will tell you what I did and you tell me what I did wrong. I used BBedit and typed the code like you said, I uploaded; it didn\'t work. Then I thought perhaps you have to put it into the cgi bin, so I tried that; didn\'t work. On both of those I kept getting this error \"parse error:parse error in/home/lora2/public_html/test.php\" So then I went back to dreamweaver and try to go through setting the site up for php like I would a regular site although I\'m not sure if I used the correct info in the host directory and all of that, cause I got this error \"http error 404\" \"Possible reason: 10 filed in the \"xxxxx\" folder that have the \".php\" file extension are not being executed by the testing server. 2) The \"xxxxx\" folder does not map to the \"xxxx\"url prefix maps to the root of your site.

 

I\'m using \"xxxxx\" instead of typing out the whole folder name.

So is this maybe my problem is in the set up, I know the hosting company that I use is php enabled and there is no problem on their end.

I appreciate the help greatly....... thank you

Again I don\'t want to write php, I just want to be able to use scripts that I have downloaded.

Lora :) :)

Link to comment
https://forums.phpfreaks.com/topic/1218-dreamweaver/#findComment-4088
Share on other sites

Ok, I appreciate the help, but I guess I need a bit more.  I will tell you what I did and you tell me what I did wrong.  I used BBedit and typed the code like you said, I uploaded; it didn\'t work.  Then I thought perhaps you have to put it into the cgi bin, so I tried that; didn\'t work.  On both of those I kept getting this error \\\"parse error:parse error in/home/lora2/public_html/test.php\\\"  

<snip>

Lora :) :)

Well, if you got parse errors, then the server is parsing PHP. Are you sure you entered the code correctly? There are no parse errors in the code I posted....
Link to comment
https://forums.phpfreaks.com/topic/1218-dreamweaver/#findComment-4089
Share on other sites

Hi, thanks for getting back to me so quickly, I\'m going crazy. Before I go any further, let me ask, is there something I need to do to my computer itself to enable php? I have an Apple G4 and I\"m running OSX Jaguar?

Other question, do I need to set up a new php site within dreamweaver first? I\'m confused. I\'m under the impression that the local web server needs to be configured to parse php includes, maybe I\"m confused on where and what is my local webserver? Please shed more light. Thank you. :oops:

Link to comment
https://forums.phpfreaks.com/topic/1218-dreamweaver/#findComment-4090
Share on other sites

To see the results of PHP scripts, your script should be running on a webserver that runs PHP.

 

AFAIK, that ain\'t DW. . . and as far as Mac/OSX goes, I\'m less than \'bright\' ...

 

So, if you\'re just using DW to look at your pages, the answer is \"probably you need to install a real webserver on your Mac, but the genie of the LAMP isn\'t all powerful and might be wrong ... \"

 

:shock: :)

Link to comment
https://forums.phpfreaks.com/topic/1218-dreamweaver/#findComment-4091
Share on other sites

Ok, I know my server runs php and I have officially configured my computer to run php. I tried again and kept getting this error

\"parse error:parse error in/home/lora2/public_html/test.php on line 2\"

 

What am I doing wrong? Please help, I\'m on my third drink already, it\'s driving me nuts! Thanks

Lora :)

Link to comment
https://forums.phpfreaks.com/topic/1218-dreamweaver/#findComment-4093
Share on other sites

Well, I think my problem is the actual set up for php page. I can\'t figure out what to put as my testing server and/or files, I\'ve tried every combination. Perhaps you can shed some light on this and I\'ll have it figured out. It seems as if the two cant\' talk to each other......it has something to do with the testing server? Please help!

Link to comment
https://forums.phpfreaks.com/topic/1218-dreamweaver/#findComment-4098
Share on other sites

  • 1 month later...

Treat PHP pages just like you would treat HTML pages...they go into the same folders....they do not reside in the CGI-Bin folder.

After you created your test.php and put this file in the same folder as all your html pages access it with your browser using the URL to your webserver....http://ip.address.of.your.webserver/test.php

 

If you are still getting errors paste your code here so we can see where you may have went wrong.

Link to comment
https://forums.phpfreaks.com/topic/1218-dreamweaver/#findComment-4892
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.