小编IRH*_*RHM的帖子

反向地理编码

我一直在努力在Google地图中整合反向地理编码的Javavscript代码.我以为我已经解决了我遇到的所有问题,但我仍然遇到问题.

当我在HTML文件中嵌入Javascript代码时,它没有任何问题.但是,如果我尝试运行javascript(带有一些改动),作为一个单独的文件,地图会在打开我的表单时加载,但是当我输入Lat和Lng坐标并按相关按钮来反转地理编码时,所有发生的事情都会发生是地图刷新.

我已经附加了JS代码嵌入的HTML文件,然后是单独的JS代码文件进行比较.

嵌入了Javascript的HTML文件

<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no"/>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Google Maps JavaScript API v3 Example: Reverse Geocoding</title>
<link href="http://code.google.com/apis/maps/documentation/javascript/examples/default.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript">
  var geocoder;
  var map;
  var infowindow = new google.maps.InfoWindow();
  var marker;
  function initialize() {
    geocoder = new google.maps.Geocoder();
    var latlng = new google.maps.LatLng(40.730885,-73.997383);
    var myOptions = {
      zoom: 8,
      center: latlng,
      mapTypeId: 'roadmap'
    }
    map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
  }

  function codeLatLng() {

    var lat = …
Run Code Online (Sandbox Code Playgroud)

javascript reverse-geocoding google-maps-api-3

15
推荐指数
1
解决办法
3万
查看次数

从服务器删除图像文件

我想知道是否有人可以帮助我.

我把这个页面放在一起,允许用户以图库格式查看他们上传的图像.

我现在想要为每个图像添加删除功能.我已经创建了按钮和它背后的Javascript,但我真的不确定如何将"按钮点击"与文件的实际物理删除相关联.

图像不存储在数据库中,而是位于我的服务器上的两个文件夹位置,结构如下:

UploadedFiles/username/locationid/imagename

UploadedFiles/username/locationid/Thumbnails/imagename

我是PHP的新手,我现在已经达到了我的知识极限,但肯定愿意学习.从我读过的文档中我认为我说这个unlink方法是正确的命令是正确的吗?

但是我发现真的很难告诉代码查找具有的文件夹username,并locationid匹配当前的文件夹username,并locationid然后删除匹配这些文件$source名可变.

我只是想知道是否有人可以就我如何解决这个问题提供一些指导.

非常感谢和亲切的问候

php delete-file

11
推荐指数
1
解决办法
1万
查看次数

保存原件副本时另存为错误

我想知道是否有人可以帮助我.

使用我在网上找到的脚本作为"基础"我在下面写了下面的查询.

Sub Test()
  Dim wb As Workbook
  Dim ThisSheet As Worksheet
  Dim NumOfColumns As Integer
  Dim RangeToCopy As Range
  Dim RangeOfHeader As Range    'data (range) of header row
  Dim WorkbookCounter As Integer
  Dim RowsInFile           'how many rows (incl. header) in new files?
  Dim fNameAndPath As Variant


  fNameAndPath = Application.GetOpenFilename(Title:="Select File To Be Opened")
  If fNameAndPath = False Then Exit Sub
  Workbooks.Open Filename:=fNameAndPath


  Application.ScreenUpdating = False

  'Initialize data
  Set ThisSheet = ActiveWorkbook.Worksheets(1)
  NumOfColumns = ThisSheet.UsedRange.Columns.Count
  WorkbookCounter = 1
  RowsInFile = …
Run Code Online (Sandbox Code Playgroud)

excel vba excel-vba save-as

8
推荐指数
1
解决办法
691
查看次数

Javascript清除按钮单击时的表单字段

我有一个名为'inputaddress'的字段,用户可以将地址详细信息输入到该字段中,因此他们可以执行Google地图地理编码.

我想要做的是当用户点击"searchfortheaddress"按钮时,它将执行地理编码,但随后将清除"inputaddress"字段.

也许有人可以告诉我,我该如何清理这个领域.

javascript user-input textinput google-maps-api-3

7
推荐指数
1
解决办法
3万
查看次数

单击按钮运行PHP文件

我想知道是否有人可以帮助我。

我一直在研究这个过程,以及许多其他站点和教程,以了解如何在打开PHP文件的表单中添加按钮,在这种情况下,这是一个允许用户将文件上传到mySQL的弹出表单。数据库。

除了打开文件之外,我还要将“ id”字段值从主表单转移到弹出的“文件上传”表单中。

根据我进行的研究,似乎有很多方法可以做到这一点,但是从初学者的角度来看,我不确定什么是最好的方法。

也许有人可以建议什么是最好的方法。

非常感谢和问候

html php button

5
推荐指数
1
解决办法
6万
查看次数

无法使用'foreach'命令加载图库图像

我将以下脚本放在一起,允许用户在原始文件夹结构中查看他们保存的上传图像.

更新的代码

        <?php session_start(); 

$_SESSION['username']=$_POST['username'];
$_SESSION['locationid']=$_POST['locationid'];

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<?php 
  //This variable specifies relative path to the folder, where the gallery with uploaded files is located.
  $galleryPath = 'UploadedFiles/' . $_SESSION['username'] . '/' . $_SESSION['locationid'] . '/';

  //let's DEBUG the above assignment 
  if (!is_dir($galleryPath)) { die("No folder exists at $galleryPath!"); } 

  $absGalleryPath = realpath($galleryPath); 

  //let's DEBUG this one too 
  if (!is_dir($absGalleryPath)) { die("No folder exists at $absGalleryPath!"); } 

  $descriptions = new DOMDocument('1.0'); …
Run Code Online (Sandbox Code Playgroud)

php session-variables

5
推荐指数
1
解决办法
412
查看次数

在PHP中上传多个文件

我想知道是否有人可以帮助我.

使用一些优秀的在线教程,我将下面的代码放在一起,允许用户将图像文件上传到服务器文件夹,并将文件名和其他详细信息上传到mySQL数据库.

PHP脚本

<?php
//define a maxim size for the uploaded images
//define ("MAX_SIZE","100"); 
// define the width and height for the thumbnail
// note that theese dimmensions are considered the maximum dimmension and are not fixed, 
// because we have to keep the image ratio intact or it will be deformed
define ("WIDTH","150"); 
define ("HEIGHT","100"); 

// this is the function that will create the thumbnail image from the uploaded image
// the resize will be done considering the width …
Run Code Online (Sandbox Code Playgroud)

php file-upload

4
推荐指数
1
解决办法
7615
查看次数

在webapp中忘记密码

我目前正在为我的网站制作管理页面,现在我已经开始考虑如果用户忘记了原始用户,他们将如何检索或获得密码.

我以前不必处理这样的事情,我不确定使用哪种解决方案,因为似乎有很多方法可以解决这个问题.所以我想我会问更有经验的开发人员.处理"密码检索"的最佳方法是什么?

如果有帮助,当用户最初注册时,他们必须提供电子邮件地址和密码,然后使用salt加密.

php passwords password-recovery

2
推荐指数
1
解决办法
212
查看次数

服务器真实路径

我想知道是否有人可以帮助我.

我正在尝试检索我正在构建的图像库脚本中使用的xml文件的文件路径.

我的文件夹结构如下:

website/development/UploadedFiles /'username'文件夹/'location'文件夹/ file.xml

我把这个放在一起尝试让我走上正轨:

<?php
chdir('var/www/');
echo realpath('./././file.xml');
?> 
Run Code Online (Sandbox Code Playgroud)

但是我收到以下错误:

警告:chdir()[function.chdir]:第2行/homepages/2/d333603417/htdocs/development/real.php中没有这样的文件或目录(错误号2)

我确信我在这里犯了一个初学者的错误,但我想至少尝试一下.我只是想知道是否有人可能会请这个,并让我知道我哪里出错了.

非常感谢

php

1
推荐指数
1
解决办法
992
查看次数

jQuery模态确认

首先,如果对于那些经验丰富的人来说这是一个非常简单的问题我很抱歉,但我对此有点新意,所以我希望有人可以帮助我.

我正在尝试在单击按钮时实现jQuery模态确认框.这在下面的脚本中显示:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Gallery</title> 
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 
  <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.10/themes/smoothness/jquery-ui.css">
  <link href="Libraries/fancybox/jquery.fancybox-1.3.1.css" rel="stylesheet" type="text/css"/> 
  <link href="Styles/style.css" rel="stylesheet" type="text/css" />
  <!--[if IE]>   
  <link href="Styles/ie.css" rel="stylesheet" type="text/css" /> 
  <![endif]-->
  <script src="Libraries/jquery/jquery-1.4.3.min.js" type="text/javascript"></script> 
  <script src="Libraries/fancybox/jquery.fancybox-1.3.1.pack.js" type="text/javascript"></script> 
  <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.6/jquery-ui.min.js" type="text/javascript"></script>     
  <script type="text/javascript">

  $(function() { $('a.fancybox').fancybox(); }); 

  </script> 

  <script type="text/javascript">
var deleteTheSelectedUrl = '';
$(document).ready(function() {
    // create the jQuery modal window and set autoOpen to false
    $("#jQueryDeleteConfirmationModalWindow").dialog({
        title: "Delete Confirmation",
        autoOpen: …
Run Code Online (Sandbox Code Playgroud)

html php jquery

1
推荐指数
1
解决办法
1568
查看次数

添加 png 图标到 HTML

我想知道是否有人可以帮助我。

首先道歉,因为对于某些人来说这可能是一个非常基本的问题,但我对此不熟悉,所以请耐心等待。

我使用下面的脚本在 fancyBox 中创建一个图像库。

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
<html xmlns="http://www.w3.org/1999/xhtml">  
<head>  
  <title>Gallery</title>  
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />  
    <script type="text/javascript" src="fancybox/lib/jquery-1.7.2.min.js"></script>
    <script type="text/javascript" src="fancybox/source/jquery.fancybox.js?v=2.0.6"></script>
    <script type="text/javascript" src="fancybox/source/helpers/jquery.fancybox-buttons.js?v=1.0.2"></script>
    <script type="text/javascript" src="fancybox/source/helpers/jquery.fancybox-thumbs.js?v=1.0.2"></script>
    <script type="text/javascript" src="fancybox/source/helpers/jquery.fancybox-media.js?v=1.0.0"></script>
    <link rel="stylesheet" type="text/css" href="fancybox/source/helpers/jquery.fancybox-thumbs.css?v=1.0.2" />
    <link rel="stylesheet" type="text/css" href="fancybox/source/helpers/jquery.fancybox-buttons.css?v=1.0.2" />
    <link rel="stylesheet" type="text/css" href="fancybox/source/jquery.fancybox.css?v=2.0.6" media="screen" />


  <script type="text/javascript">  

            $('.fancybox').fancybox({
                openEffect  :   'elastic',
                closeEffect :   'elastic',

                padding :   20,
                fitToView   :   true,

                prevEffect :    'none',
                nextEffect :    'none',

                closeBtn  : false,
                arrows : false, …
Run Code Online (Sandbox Code Playgroud)

jquery icons fancybox

1
推荐指数
1
解决办法
2万
查看次数

jQuery UI 垃圾桶图标

在本网站用户的帮助下,我成功地整理了这个画廊页面。

您将在示例页面上看到我使用十字来允许用户删除图像。我遇到的问题是尝试将图标更改为 jQuery UI“垃圾箱”图标。我找到了有问题的图标,.ui-icon-trash但我找不到任何有关如何在我的页面中实现此图标的说明。

处理图标的代码如下:

 .galleria-thumbnails .btn-delete {    
          display: block;  
          position: absolute; bottom : 0px;   
          width: 80px;     
          height: 80px;    
          cursor: pointer;     
          background: url(cross.png) no-repeat bottom; } 
Run Code Online (Sandbox Code Playgroud)

我尝试过更改url(cross.png)url(.ui-icon-trash),但url(class=.ui-icon-trash)没有成功。如果可能的话,我还喜欢将图标居中,而不是其当前位置off-centre

我只是想知道是否有人可以看看这个并让我知道我哪里出错了。

jquery jquery-ui

1
推荐指数
1
解决办法
5426
查看次数