![]() |
![]() |
||||||
|
|||||||
| Tags: insert, redirect |
![]() |
|
|||
|
It seems that the standard way of including the connection script i.e.
virtual("/Connections/connScript.php") is at least, part of the problem. When I use the require_once command, it allows me to get the login and stuff working. But it also sort of breaks the behavior in DW. (Gives me the dreaded red exclamation mark). It is not fixed ... but at least a measure of success. Any ideas? Dave |
| Sponsored Links |
|
|||
|
dfilchak wrote:
> I was hoping you were on to something with this but thhat preference is not > checked so I do not believe this is the culprit. I assume that if this wwas > checked, there would be something in the <head> section? No, the Byte Order Mark is a hidden character, which is why it causes a lot of people grief. As Mark points out, you also need to check any include files. A common cause is an extra line after the closing PHP tag of an include. -- David Powers, Adobe Community Expert Author, "The Essential Guide to Dreamweaver CS3" (friends of ED) Author, "PHP Solutions" (friends of ED) http://foundationphp.com/ |
|
|||
|
[q]Originally posted by: Newsgroup User
dfilchak wrote: > I was hoping you were on to something with this but thhat preference is not > checked so I do not believe this is the culprit. I assume that if this wwas > checked, there would be something in the <head> section? As Mark points out, you also need to check any include files. A common cause is an extra line after the closing PHP tag of an include. -- [/q] The only include file I have is with the dB connection script and I have checked it to death. There are no extra lines spaces or <CR>. There is definitely something with the use of virtual as opposed to require or require_once. It seems to want to work using require or require_once. However, using this breaks the DW code for record sets and insert/delete functions. It never used to but seems to now. Dave |
|
|||
|
dfilchak posted in macromedia.dreamweaver.appdev:
> There is definitely something with the use of virtual as opposed > to require or require_once. It seems to want to work using require > or require_once. However, using this breaks the DW code for record > sets and insert/delete functions. It never used to but seems to > now. 'Fraid I'm not going to be much help from here. I don't know anything about DW's DB behaviors. Sorry. Out of curiosity, I ran an experiment on my DW8 box (simple recordset with a repeat region) and it used require_once(). Perhaps virtual() is new with CS3 (my CS3 box is taking today off). Again, this is the first time I ever tried one of those behaviors. -- Mark "bowing out" Boyd Keep-On-Learnin' ![]() |
|
|||
|
Mark A. Boyd wrote:
> Out of curiosity, I ran an experiment on my DW8 box (simple recordset > with a repeat region) and it used require_once(). Perhaps virtual() is > new with CS3 (my CS3 box is taking today off). Dreamweaver uses virtual() if your site definition uses links relative to the site root. If you use links relative to the document (the DW default), it uses require_once(). I don't know when Dreamweaver started using virtual() if you select root-relative links, but it's generally a bad idea. The idea of virtual() is that it permits root-relative links for include files. However, it works only on Apache, and even the PHP manual advises against using it. -- David Powers, Adobe Community Expert Author, "The Essential Guide to Dreamweaver CS3" (friends of ED) Author, "PHP Solutions" (friends of ED) http://foundationphp.com/ |
|
|||
|
Yeah that was totally the problem. I can't remember eithher when DW started
using virtual but they should quit it!!! This is 3 days of my life I'll never get back. Anyway, setting the site to use document relative links solves this issue and it still does not stop you from using site relative linking for your pages. You just do not get it done automagically for you. It is just not good to do it with your includes. Hummm ... I used to use something like <?php require_once ($_SERVER['DOCUMENT_ROOT'] . "/path_to_file/file.php") in the past. I wonder if this will work under these conditions? Probably not as DW is really picky about how the behavior is written in the code. For instance, if I try to clean up the number of opening and closing PHP tags by combining everything into one block, DW complains that it cannot find the connection. If I isolate the include block inside its own opening and closing PHP tags, DW is happy. Very BIZARRE!!! Anyway ... I want to say thanks to all who worked with me on this and hopefully we've all learned a lesson .... get a life!!! ;-) thanks again everyone. Dave |
|
|||
|
David Powers posted in macromedia.dreamweaver.appdev:
> Mark A. Boyd wrote: >> Out of curiosity, I ran an experiment on my DW8 box (simple >> recordset with a repeat region) and it used require_once(). >> Perhaps virtual() is new with CS3 (my CS3 box is taking today >> off). > > Dreamweaver uses virtual() if your site definition uses links > relative to the site root. If you use links relative to the > document (the DW default), it uses require_once(). Thanks for the info. (Your new book arrived last week & I expect to get more Powers gems from it soon ![]() > I don't know when Dreamweaver started using virtual() if you > select root-relative links, but it's generally a bad idea. The > idea of virtual() is that it permits root-relative links for > include files. However, it works only on Apache, and even the PHP > manual advises against using it. Wow. I was thinking about exploring those behaviors since today's excercise was so easy. Any other gotcha's? One thing holding me back was the fact that it placed that Connections folder in the server document root - userID, password and all. Not a practice I prefer. -- Mark A. Boyd Keep-On-Learnin' ![]() |
|
|||
|
dfilchak posted in macromedia.dreamweaver.appdev:
> For instance, if I try to clean up the > number of opening and closing PHP tags by combining everything > into one block, DW complains that it cannot find the connection. > If I isolate the include block inside its own opening and closing > PHP tags, DW is happy. Very BIZARRE!!! And one of the gotcha's that would likely bite me if I explore those behaviors further. Thanks for the heads up. -- Mark A. Boyd Keep-On-Learnin' ![]() |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
- Contact Us
-|-
Adobe Dreamweaver Forums -|-
Archive -|-
Top -|-Rules/Disclaimer-|-Help/Support-|-Advertise