I want to draw trace of car and mark and infowindow by using googlemap api and php. when I write url like "http://maps.google.com/maps/api/js?v=3&sensor=false", after "//", it's just comment not url and it occurs File does not exist: /var/www/maps.google.com problem... I tried $aa = "http:/"; $bb = "/maps.google.com"; $aa.$bb/maps/~~~ but not works... How can I fix it?? please help me..

9 Months
Discussion Span
Last Post by hericles

If I understand you correctly, are you saying that:
$ulr = "http://someurl.com";
is getting presented as a comment?

You must have something wrong in your code. You should be able to do things like
echo "http://someurl.com";
and see it correctly on your page.
Can you post up the code segment in question?


Hello, my code is like that

<html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> <title>Google Map API V3 with markers</title> <style type="text/css">
 body { font: normal 10pt Helvetica, Arial; }
 #map { width: 350px; height: 300px; border: 0px; padding: 0px; }
 </style> <script src="$aa.$bb/maps/api/js?v=3&sensor=false" type="text/javascript"></script> <script type="text/javascript">
 //Sample code written by August Li
 var icon = new google.maps.MarkerImage("**http://maps.google.com/mapfiles/ms/micons/blue.png**",
 new google.maps.Size(32, 32), new google.maps.Point(0, 0),
 new google.maps.Point(16, 32));
 var center = null;
 var map = null;
 var currentPopup;
 var bounds = new google.maps.LatLngBounds();

bolded part is problem..

after "// ", "maps.google.com/mapfiles/ms/micons/blue.png" is presented as comment.


You have this line:
<script src="$aa.$bb/maps/api/js?v=3&sensor=false"

Can I assume the $aa and $bb is coming from PHP? Because it isn't getting rendered correctly if it is.
If you are creating those variables in a PHP template I think you aren't using the <?php tags correctly.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.