使用我的下面的代码我可以<abcxyz>轻松读取xml标签.但我如何<abc:xyz> </abc:xml>使用php.pls帮助读取xml标签.. xml标签之间的数据....
我的php示例代码...
$objDOM->load("abc.xml");
$note = $objDOM->getElementsByTagName("note");
foreach( $note as $value )
{
$tasks = $value->getElementsByTagName("tasks");
$task = $tasks->item(0)->nodeValue;
$details = $value->getElementsByTagName("details");
$detail = $details->item(0)->nodeValue;
echo "$task :: $detail<br>";
}
Run Code Online (Sandbox Code Playgroud)
我的XML示例代码:
<mynotes>
<note>
<tasks>Task 1</tasks>
<details>Detail 1</details>
</note>
<abc:xyz> Cannot Read the XML data between this tag</abc:xyz>
</mynotes>
Run Code Online (Sandbox Code Playgroud)
请指导我......
由于
里亚德
使用下面的代码我只得到名字前4个字符.但我需要除了最后4个字符之外的名称.
string fileName = Textbox1.text;
string newName = fileName.Substring(0, 4);
Run Code Online (Sandbox Code Playgroud)
// ex:输入abcdef.txt //输出:abcd
但我需要输出:abcdef
请帮忙!
谢谢里亚德
我可以将输入值发送到表单操作中吗?假设在表单上输入了电话号码.现在我可以将电话号码作为表单操作参数" 号码 "发送吗?是他们的任何方式发送它?
<form method="post" action="abc.php?number=ph_number" enctype="multipart/form-data">
<input type="text" name="ph_number" value=""/>
<input type="submit" name="search" value="SEND"/>
</form>
Run Code Online (Sandbox Code Playgroud)
我该怎么做?
在此先感谢
riad
亲爱的,我需要在不使用 php 表单的情况下将参数发送到 URL 并从该页面获取值。我们可以使用这样的表单轻松发送参数:
<html>
<form action="http://..../abc.php" method="get">
<input name="id" type="text" />
<input name="name" type="text"/>
<input type="submit" value="press" />
</form>
</html>
Run Code Online (Sandbox Code Playgroud)
但我已经有了这样的价值
<?php
$id="123";
$name="blahblah";
?>
Run Code Online (Sandbox Code Playgroud)
现在我需要值发送到HTTP://..../abc.php不使用form.when 2值发送给abc.php链接,然后它的显示值确定。现在我已经收集了“OK” MSG来自 abc.php 并打印在我当前的页面上。我需要自动执行代码。当用户进入页面时,这些值会自动发送到 url。所以我不能使用表单或 href。因为 form 和 href 需要额外的一键点击。
他们有没有好心人可以帮我解决这个问题?
我知道这是一个非常古老的问题.但我真的必须再次提出同样的问题.我如何使用PHP更新我的状态?因为我在google和stackoverflow中找到了几个解决方案,但目前还没有.但可能是facebook的原因渐变过程或其他任何事情.我知道:1)http://360percents.com/posts/php-curl-status-update-working-example-sep-2010/ 2)http://www.barattalo.it/2010/03/01/php -curl -僵尸来更新Facebook的状态/
但不幸的是,没有解决方案正在工作.那么,他们是否有任何善良的心可以帮助我轻松地使用PHP更新facebook状态?如果有人请给任何有用的解决方案,我将非常坚持.问候---里亚德
我在$abc变量中有文本.
现在我想检查文本是否只能包含字符(a-z, A-Z, 0-9).如果他们有除了那些之外的任何字符,那么应该返回"输出".
我怎样才能做到这一点?
example: $abc = "this is @ text"; // no match
Run Code Online (Sandbox Code Playgroud) 我有一个临时表:#temp321
select * from #temp321
Run Code Online (Sandbox Code Playgroud)
它的回报价值就像
Field1|Field2|Field3|....|FieldN|
--------------------------------
Value1|Value2|Value3|....|ValueN|
Run Code Online (Sandbox Code Playgroud)
这个#temp321表是从另一组查询中自动生成的.因此,#temp321表的列数可以变化(1-25).但他们将永远是一排.现在我需要使用这些值编写where语句.
示例:
where Field1='Value1' and Field2='Value2' and Field3='Value3'.....FieldN='ValueN'..(depends on number of column available into the #temp321 table)
我是如何做到的.提前致谢
我的下面的PHP代码在浏览器上显示原始大小为300x300的图像.
<?
$location="http://localhost/folwer.bmp ";
header("Location: $location");
?>
Run Code Online (Sandbox Code Playgroud)
但我需要在浏览器上将其显示为120x240或任何其他大小.如果不使用PHP调整原始图像大小,我该怎么办呢?请帮忙.
我的下面的代码创建了一个txt文件并将一些内容写入该文件.但是当我多次运行脚本时,我需要在前面的行之后写一个新行.码:
string filePath = "D:\\DOT_NET\\C#\\abc.txt";
FileInfo t = new FileInfo(filePath);
StreamWriter Tex = t.CreateText();
Tex.WriteLine("Hi freinds");
Tex.WriteLine("csharpfriends is the new url for c-sharp");
Tex.Write(Tex.NewLine);
Tex.Close();
Run Code Online (Sandbox Code Playgroud)
abc.txt文件的当前输出:
Hi friends
csharpfriends is the new url for c-sharp
Run Code Online (Sandbox Code Playgroud)
但是如果我多次运行脚本,我需要输出:
Hi friends
csharpfriends is the new url for c-sharp
Hi friends
csharpfriends is the new url for c-sharp
Hi friends
csharpfriends is the new url for c-sharp
Run Code Online (Sandbox Code Playgroud)
我怎样才能做到这一点?请帮忙.
亲爱的,我如何匹配2个数组并使用c#将匹配的值保存到新数组中?
for (int j = 0; j < arrayA.Length; j++)
{
for (int k = 0; k < arrayB.Length; k++)
{
if (arrayA[j] == arrayB[k])
{
arrayB[k];
//How i keep this matched record into a new array?
}
}
}
Run Code Online (Sandbox Code Playgroud)
另一件事:他们是否有任何捷径匹配2阵列并将记录保存到新阵列中?任何善良的心.请帮忙.
我需要确定一个字符串的开头和结尾是一个数字值和7位长.
让 - 1000453或0984567.这两个字符串以数字值开头并以数字值结束.如果任何字符串以任何字符开头,请说 - a234567 比显示失败.
请在PHP中建议.
提前致谢
这里已经提出了类似的问题.但目前的情况比以前有点复杂.在示例中,如果相同,Itime那么我们可以按案例排序,但如果Itime和结果相同,那么我该如何排序.
我的问题是,结果ID:3,5,6,1,2,7,8,4.为什么失败案例是2,7,8.
为什么不是8,2,7?
如果我想要预期的结果如:3,5,1,6,8,2,7,4我该怎么办?
请运行以下命令并帮我排序.提前致谢.
if object_id('tempdb.dbo.#temp321','U') is not null
drop table tempdb.dbo.#temp321
create table #temp321(id int, uname varchar(50), current_point int,
previous_point int, ITime datetime, Result varchar(10))
INSERT into #temp321 values('1','a','50','40','2012-11-12 13:12:28.103','pass')
INSERT into #temp321 values('2','b','15','10','2012-11-12 13:12:28.103','fail')
INSERT into #temp321 values('3','c','71','70','2012-11-12 12:58:30.000','pass')
INSERT into #temp321 values('4','d','34','30','2012-11-12 13:12:28.103','withdraw')
INSERT into #temp321 values('5','e','40','35','2012-11-12 12:58:41.360','withdraw')
INSERT into #temp321 values('6','f','65','60','2012-11-12 13:12:28.103','pass')
INSERT into #temp321 values('7','g','20','15','2012-11-12 13:12:28.103','fail')
INSERT into #temp321 values('8','h','10','7','2012-11-12 13:12:28.103','fail')
select
ID
from
#temp321
ORDER BY …Run Code Online (Sandbox Code Playgroud)