首页 \ 问答 \ 是否有适用于iPhone sdk的TFTP客户端,可以将文件传输到TFTP服务器?(Is there any TFTP client for iPhone sdk, which can tranfer files to TFTP server?)

是否有适用于iPhone sdk的TFTP客户端,可以将文件传输到TFTP服务器?(Is there any TFTP client for iPhone sdk, which can tranfer files to TFTP server?)

对于iOS,是否可以使用普通的FTP客户端(使用NSURLConnection和CFFTPStream API的FTP操作)将文件发送到TFTP服务器?

或者是否有适用于iOS的专用TFTP客户端?


Is it possible to use a normal FTP client (FTP operations using the NSURLConnection and CFFTPStream APIs) to send file to TFTP server, for iOS?

Or is there a dedicated TFTP client for iOS?


原文:https://stackoverflow.com/questions/5057613
更新时间:2023-07-23 06:07

最满意答案

如果文件a.php在另一个目录中,则路径可以是相对的(对于当前文件a.php目录)或绝对路径(基于服务器绝对文件路径)。

亲戚的例子:

<?php 
     include('../a.php'); // one directory back, as the file path is always relative to the file in which include (or require or any of the others) is being called.
?>

绝对的例子:

<?php
     include('/path/to/server/root/some/folder/a.php'); // absolute path 
?>

希望这可以帮助。


UPDATE

你一直说“它是错的”或“它不起作用”,但你真的没有很好地解释你的文件结构。 所以我要假设您的文件夹结构看起来像这样,例如:

  • WEB ROOT
    • 项目A
      • a.php只会
    • 项目B
      • b.php

现在,如果你在a.php中,你可以按如下方式要求b.php:

require_once('../ProjectB/b.php');

如果你在b.php里面并希望包含a.php,它可以如下:

include_once('../ProjectA/a.php');

注意,我使用了包括AND require,由您来研究使用哪个。


If file a.php is in another directory, the path can be either relative (to your current file a.php directory) or absolute (based on your servers absolute file path).

Example of relative:

<?php 
     include('../a.php'); // one directory back, as the file path is always relative to the file in which include (or require or any of the others) is being called.
?>

Example of absolute:

<?php
     include('/path/to/server/root/some/folder/a.php'); // absolute path 
?>

Hope this helps.


UPDATE

You keep saying "it's wrong" or "it doesn't work" but you really have not explained your file structure very well. So I am going to ASSUME that your folder structure looks like this, for examples sake:

  • WEB ROOT
    • ProjectA
      • a.php
    • ProjectB
      • b.php

Now, if you were inside of a.php, you could require b.php as follows:

require_once('../ProjectB/b.php');

If you were inside of b.php and wanted to include a.php, it could be as follows:

include_once('../ProjectA/a.php');

Note, I have used include AND require, it's up to you to research which to use.

相关问答

更多
  • 如果文件a.php在另一个目录中,则路径可以是相对的(对于当前文件a.php目录)或绝对路径(基于服务器绝对文件路径)。 亲戚的例子: 绝对的例子:
  • 您可以通过检查其中一个WP常量来阻止.php文件从WP环境外运行: if ( ! defined( 'ABSPATH' ) ) exit; 希望有所帮助 You can stop .php files from being run from outside of your WP environment by checking for one of the WP constants: if ( ! defined( 'ABSPATH' ) ) exit; Hope that helps
  • 当你指定源/目标时,它是相对于当前的wscript文件表示的。 $ waf configure build ... source not found: 'a.target' in bld(source='a.target, ...) ... $ tree build build/ ├── a │ └── a.target ... 知道这个问题,就是在b/wscript正确引用a.target源文件: def build(bld): bld (rule = 'cp ${SRC} ${TGT}', ...
  • 如果您想限制对文件的访问,您应该考虑将它们存储在公共DocumentRoot之外并使用PHP来传递文件,并应用您自己的访问逻辑。 这意味着在www或public_html文件夹之外,这取决于您正在使用的托管环境。
  • 关于ropemacs和ropemode的文档似乎非常稀疏(主页http://rope.sourceforge.net/ropemacs.html只指向mercurial repos,我检查并通过代码阅读),但似乎你可以给出一个特定的.ropeproject使用,可以通过在目录树中搜索.ropeproject目录来猜测它(ropemode / interfaces.py:__guess_project)。 因此,如果为project1 /和project2 /创建一个特定的.rope项目,那么通过创建一个(新 ...
  • 为了将来参考,我尝试了这个并且它有效。 Options +FollowSymlinks RewriteEngine On RewriteRule ^(.+)\.zig$ $1.php [NC,L] 它会将eample.php转换为example.zig 。 For future reference, I tried this and it worked. Options +FollowSymlinks RewriteEngine On RewriteRule ^(.+)\.zig$ $1.php [NC, ...
  • 需要注意的两件重要事情 fileatime函数的结果被缓存。 使用clearstatcache()清除缓存。 某些Unix系统禁用了访问时间更新,因为此功能会降低定期访问大量文件的应用程序的性能。 所以,请尝试以下示例 "; echo "Last access: ".date("F d Y H:i:s.",fileatime("test.txt")); ?> Two impor ...
  • 我建议将你的项目转移到现在引入VS 2017和NuGet 4的PackageReference样式(远离packages.config )(最近的15.2更新,这也支持经典的.net项目 - 不仅仅是.net core / .net标准项目)。 最大的区别在于依赖关系是可传递的,因此您只需指定从Pr1到N1的包引用,并自动获取N1引用的N2版本。 如果然后从项目Pr2到Pr1添加项目引用,则此项目将自动引用N1和N2。 因此,如果您更新Pr1使用的N1版本,它将获得N1所需的N2更新,而Pr2也将使用新的N ...
  • 有很多方法可以防止这种情况发生 使用user_id加密pdf文件名并存储在数据库中,并仅向允许的用户提供名称。 您可以存储除您的服务之外的所有pdf文件,如Amazon Simple Storage Service (Amazon S3) 第一种选择是免费的 There are many ways to prevent this Encrypt pdf file name and store in database with user_id, and provide the name only to all ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)