Jump to content

Recommended Posts

Posted

I get this error when I try to view the route map:  Parse error: syntax error, unexpected T_ELSE in /home/a8930745/public_html/phpvms/core/modules/RouteMap/RouteMap.php on line 31

I checked and double checked, and that particular part of the code is exactly as Nabeel said to make it. Any help is appreciated.

Posted

Here it is

$shownroutes = array();

$centerlat = 0;

$centerlong = 0;

# Create map

foreach($allschedules as $schedule)

{

 

  $route = $schedule->depicao.$schedule->arricao;

 

  if(in_array($route, $shownroutes));

  {

    continue;

  }

                  else

  {

      $shownroutes[] = $route;

  }

  • Administrators
Posted

It also seems like you're missing the closing bracket for the foreach()

Also, PLEASE indent!! After every { there should be an indent, you'll spot errors real fast:

$shownroutes = array();
      
$centerlat = 0;
$centerlong = 0;
      
# Create map
foreach($allschedules as $schedule)
{
       
       $route = $schedule->depicao.$schedule->arricao;
       
       if(in_array($route, $shownroutes))
       {
              continue;
        }
       else
       {
              $shownroutes[] = $route;
       }
}

Posted

Thanks for the help. There are no more errors, but when I go to the page it loads but no map shows up. I have a google API key, and the live flight map works, just when I go to the routmap nothing loads on the page.

Posted

When I try to save the file I get this error: Warning: ftp_put() [function.ftp-put]: Can't open that file: Permission denied in /home/manager/public_html/includes/filesystem.inc.php on line 1367  Status: This file could not be saved.

Posted

When I use that I get the following php error: Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/home/a8930745/public_html/phpvms//core/templates/<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Route Map</title> </head> <body> <script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAmh5p1i5yMwpb66nDaOw1eRQwTXokuW8BVf_s5QXPuQRNUwc0eRRF4KMwcmpt4u7wbdAJNLbxS-w5jA" type="text/javascript" charset="utf-8"></script><script type="text/javascript" charset="utf-8"> //<![CDATA[ /************************************************* * Created with GoogleMapAPI 2.5 * Author: Monte Ohrt <monte AT ohrt DOT com> * Copyright 2005-2006 New Digital Group * http://www.phpinsider.com/php/code/GoogleMapAPI/ *************************************************/ var points = []; var markers = []; var counte in /home/a8930745/public_html/phpvms/core/classes/TemplateSet.class.php on line 95

Thanks.

  • 2 weeks later...
Posted

Could anyone tell me what this error is saying/how to fix it? I have been trying to fix it/ trace the route of the problem for quite some time, but to no avail. Thanks.

Posted

Seems like you're putting HTML in your title

Could you please explain what you mean/how to fix it. I think I understand what you are saying, but I want to be sure. I apologize for the extent of my questions, I am not very good at coding, as you can probably guess. Thanks for all of your help so far.

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.

Loading...
×
×
  • Create New...