为什么我的填充不起作用以及如何纠正错误....我是新来的
sign_creator($data); // Creates a GET array for arrays $data
echo '<script type="text/javascript">
var page = "';
echo 'https://api.facebook.com/restserver.php?'.http_build_query($data); // Show out link results
echo '";
var $dialog = $('<div></div>') .html('<iframe style="border: 0px; " src="' + page + '" width="100%" height="100%"></iframe>')
.dialog(
{ autoOpen: false, modal: true, height: 625, width: 500, title: "Some title" }
);
$dialog.dialog('open');
</script>';
?>
答案 0 :(得分:0)
你必须逃避单引号,试试这个:
DECLARE @SQLIMG VARCHAR(MAX),
@IMG_PATH VARBINARY(MAX),
@TIMESTAMP VARCHAR(MAX),
@ObjectToken INT
DECLARE IMGPATH CURSOR FAST_FORWARD FOR
SELECT csl_CompanyLogo from mlm_CSCompanySettingsLocalizations
OPEN IMGPATH
FETCH NEXT FROM IMGPATH INTO @IMG_PATH
WHILE @@FETCH_STATUS = 0
BEGIN
SET @TIMESTAMP = 'd:\' + replace(replace(replace(replace(convert(varchar,getdate(),121),'-',''),':',''),'.',''),' ','') + '.bmp'
PRINT @TIMESTAMP
PRINT @SQLIMG
EXEC sp_OACreate 'ADODB.Stream', @ObjectToken OUTPUT
EXEC sp_OASetProperty @ObjectToken, 'Type', 1
EXEC sp_OAMethod @ObjectToken, 'Open'
EXEC sp_OAMethod @ObjectToken, 'Write', NULL, @IMG_PATH
EXEC sp_OAMethod @ObjectToken, 'SaveToFile', NULL, @TIMESTAMP, 2
EXEC sp_OAMethod @ObjectToken, 'Close'
EXEC sp_OADestroy @ObjectToken
FETCH NEXT FROM IMGPATH INTO @IMG_PATH
END
CLOSE IMGPATH
DEALLOCATE IMGPATH
答案 1 :(得分:0)
当在php中使用单引号定义字符串并且你想在字符串中使用它时,你必须使用反斜杠(adapter.notifyDataSetChanged();
)来告诉php它唯一的字符而不是代码。
\
但是您可以使用以下代码来回显php标签中的字符串:
sign_creator($data); // Creates a GET array for arrays $data
echo '<script type="text/javascript">
var page = "';
echo 'https://api.facebook.com/restserver.php?'.http_build_query($data); // Show out link results
echo '";
var $dialog = $("<div></div>").html(\'<iframe style="border: 0px; " src="' + page + '" width="100%" height="100%"></iframe>\')
.dialog(
{ autoOpen: false, modal: true, height: 625, width: 500, title: "Some title" }
);
$dialog.dialog(\'open\');
</script>';
?>