Copy link to clipboard
Copied
When I double click a php variable to highlight it and copy ad paste the '$' part of the variable does not get selected, so the paste creates an error. I had the same problem in the version before 2017 but they fixed it in 2017 and now it's back. Even when clicking and dragging my cursor over a variable name often the '$' does not get selected. Is this a bug?
1 Correct answer
This is a known issue or not, according to personal views. I don't know if anything is being done about it or it is what it is:
Copy link to clipboard
Copied
This is a known issue or not, according to personal views. I don't know if anything is being done about it or it is what it is:
Copy link to clipboard
Copied
So tempting to mark this as helpful for comedy value.
Copy link to clipboard
Copied
roberts33286217 wrote
So tempting to mark this as helpful for comedy value.
Yeah <shrug> - I use Php Storm that knows more about php workflow than DW - the $ gets selected, as I would expect.
Copy link to clipboard
Copied
At least yours works! How do you even get your php to do anything in dreamweaver? And yeah I'm absolutely sure its a dumb question because I only started using this program 2 weeks ago and the only programs I've ever written before this were for MatLab...
I've been using these two tutorials trying to build a photo gallery (first one to set up a php testing environment because it wasn't working at all, second one is the code I was copying).
Setting up a PHP development environment for Dreamweaver | Adobe Developer Connection
http://html-tuts.com/jquery-image-slider/
Have I missed something super basic? Do I have to tell dreamweaver to download something like when you use a typekit font or should it just understand that I'm writing bits in php? Thanks so much if you are able to help me or recommend an easier solution to get photos to display
Copy link to clipboard
Copied
lenarigoll wrote
At least yours works! How do you even get your php to do anything in dreamweaver? And yeah I'm absolutely sure its a dumb question because I only started using this program 2 weeks ago and the only programs I've ever written before this were for
You havent grasp the concept of php as yet.
1) You need to use a php file extension, .php rather than .html (That's the easy part).
2) You need a server set up to run php. You can either upload and test your pages on your remote server, as long as its compatible with php or in most cases while in development mode you download a FREE local server, for example XAMPP, MAMP. Google to find the download pages.
Once installed you create your site folder within the applicable folder inside XAMMP, MAMP - for MAMP its htdocs.
You can then start using php in your website pages and run them via the local server.
Its quite easy once you grasp the basic fundamentals....good luck.
Copy link to clipboard
Copied
Thank you! It's the easy part that I have no idea about, the tutorial I was copying is not in Dreamweaver. Does that mean I save a separate document with all the bits of php in it? Or do I save the whole thing as php? Alternatively do you know of somewhere I could learn more about this so I don't have to ask you all these stupid questions?
I will be using MAMP when I get the rest of this figured out, I've downloaded everything and carefully saved it all with the right names in the right folders by the looks of it.
Copy link to clipboard
Copied
lenarigoll wrote
Thank you! It's the easy part that I have no idea about, the tutorial I was copying is not in Dreamweaver. Does that mean I save a separate document with all the bits of php in it? Or do I save the whole thing as php?
No, php code and html code can exist together in the same page.
The important part is you need to name the file with a .php extension
photography.php rather than photography.html
Then any php you put inside that page will work if you run the page via either a remote server or local testing server.
If you have downloaded MAMP and installed it there will be a folder in it called 'htdocs'. That's were you will keep your dynamic websites. So move your site folder to the htdocs folder and then makes sure to redefine its location in Dreamweaver to point to that folder The defining is a bit different than when you define a folder which doesnt contain any dynamic coding.
See if the below url helps in setting up the testing server:
How to set up a testing server in Dreamweaver
Once installed you can always test to see if your local server is working correctly by typing in the url bar of a browser the below: (replace name_of_folder and name_of_file.php with those of your folder name and file:
localhost/name_of_folder/name_of_file.php
Above is for Mac, I don't know about PC but if would be similar
Copy link to clipboard
Copied
ah okay, so you can still write most of it in html but if you use php somewhere in the page that whole page has to be saved as a .php file rather than .html interesting. Thanks so much for your help I'm not sure where I would go to learn all this otherwise!
I have a mac, haven't used a windows for a long time. I used this tutorial:
Setting up a PHP development environment for Dreamweaver | Adobe Developer Connection
to set up MAMP but yours looks more in-depth so ill check to make sure its all the same. I've definitely saved my entire folder to htdocs and redefined its location in dreamweaver already so I've got that far at least, shouldn't have many more problems (fingers crossed).
Thanks again!!
Copy link to clipboard
Copied
I do have one last question for you though (then I promise I'll try and figure the rest out on my own!)
When I try to save that page as .php, it wants me to define a whole new site. Does that mean I should save all the other pages as .php so that can all stay in the same folder even if they have no php used in them? I think I'm going to set up a whole new folder and start blank php files where I copy each whole page across and just abandon the other folder. You can tell how rookie I am because my first folder is called website hahaha not a helpful name at all.
Copy link to clipboard
Copied
lenarigoll wrote
I do have one last question for you though (then I promise I'll try and figure the rest out on my own!)
When I try to save that page as .php, it wants me to define a whole new site. Does that mean I should save all the other pages as .php so that can all stay in the same folder even if they have no php used in them? I think I'm going to set up a whole new folder and start blank php files where I copy each whole page across and just abandon the other folder. You can tell how rookie I am because my first folder is called website hahaha not a helpful name at all.
Just change the name of the file by double clicking the file name itself, outside of DW, like you would normally change a file name if needed. It will ask if you want to use .php instead of .html, click use .php
And yes, although you dont have to use the .php extension for a file if there is no php included in it I always use .php just incase somewhere down the road a bit I need to include some php. I never use .html for any file these days.
Copy link to clipboard
Copied
Awesome! Thanks for your help, I've learnt so much!!

