Home Backend Development PHP Tutorial 这段代码为什么没执行?解决方法

这段代码为什么没执行?解决方法

Jun 13, 2016 am 10:17 AM
content file quot vbs

这段代码为什么没执行?
通过PHP调用vbs脚本 启动迅雷下载软件. 单独运行vbs迅雷可以下载 PHP调用 没反应?
php代码如下:
define('ROOT', dirname(__FILE__).'/');
define('vbs', ROOT.'cmccapp_down.vbs');
$rs = array();
$file = 'http://www.baidu.com/img/baidu_sylogo1.gif';
if(!is_file($file)){
$name = basename($file);
$rs = array($file, $name, 'http://www.cmccapp.com/');
$content = file_get_contents(vbs);
preg_match_all('#\"([^"]+)\",#', $content, $m);
foreach($m[1] as $key=>$val){
$content = str_replace($val, $rs[$key], $content);
}
file_put_contents(vbs, $content);
$WshShell = new COM("WScript.Shell");

$cmdline = "cmd /C ".vbs;
$oExec = $WshShell -> Run($cmdline, 0, false);?
}
?>


vbs代码如下:

Set ThunderAgent = CreateObject("ThunderAgent.Agent.1")?
Call ThunderAgent.AddTask("http://www.baidu.com/img/baidu_sylogo1.gif","baidu_sylogo1.gif","","","http://www.cmccapp.com/",1,0,5)?
Call ThunderAgent.CommitTasks2(1)?
Set ThunderAgent = Nothing

------解决方案--------------------
PHP调用COM组件超级不稳定,放弃吧

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to enable the VBS function of Win11 How to enable the VBS function of Win11 Dec 25, 2023 pm 02:09 PM

If you want to open vbs after closing it before, you can also open it. We can use the command code to open it. Let's take a look at how to open vbs. It is actually very simple. How to open win11vbs: 1. First, we click on the “Start Menu”. 2. Then click "Windows Terminal". 3. Then enter "bcdedit/sethypervisorlaunchtypeauto". 4. Then restart the computer, open the start menu, and search for "system information" in the search bar. 5. Then check whether "virtualization-based security" is turned on.

How to open vbs in win11 system? How to restart vbs in win11 How to open vbs in win11 system? How to restart vbs in win11 Jan 31, 2024 pm 11:24 PM

vbs is the abbreviation of Virtual-BasedSecurity, which is a security function based on virtualization. However, in Windows 11 systems, it is turned off by default. For users who need to use this feature, they may not know how to enable it. Fortunately, we can enable it via Windows Terminal (as administrator). For the convenience of users, we will share detailed steps in today’s Win11 tutorial. If you need more information, please visit our website. Tutorial on restarting vbs in win11 1. First, we right-click the start menu on the left side of the taskbar. 3. Then enter bcdedit/sethypervisorlaun

Use java's File.length() function to get the size of the file Use java's File.length() function to get the size of the file Jul 24, 2023 am 08:36 AM

Use Java's File.length() function to get the size of a file. File size is a very common requirement when dealing with file operations. Java provides a very convenient way to get the size of a file, that is, using the length() method of the File class. . This article will introduce how to use this method to get the size of a file and give corresponding code examples. First, we need to create a File object to represent the file we want to get the size of. Here is how to create a File object: Filef

Hongmeng native application random poetry Hongmeng native application random poetry Feb 19, 2024 pm 01:36 PM

To learn more about open source, please visit: 51CTO Hongmeng Developer Community https://ost.51cto.com Running environment DAYU200:4.0.10.16SDK: 4.0.10.15IDE: 4.0.600 1. To create an application, click File- >newFile->CreateProgect. Select template: [OpenHarmony] EmptyAbility: Fill in the project name, shici, application package name com.nut.shici, and application storage location XXX (no Chinese, special characters, or spaces). CompileSDK10, Model: Stage. Device

How to convert php blob to file How to convert php blob to file Mar 16, 2023 am 10:47 AM

How to convert php blob to file: 1. Create a php sample file; 2. Through "function blobToFile(blob) {return new File([blob], 'screenshot.png', { type: 'image/jpeg' })} ” method can be used to convert Blob to File.

Rename files using java's File.renameTo() function Rename files using java's File.renameTo() function Jul 25, 2023 pm 03:45 PM

Use Java's File.renameTo() function to rename files. In Java programming, we often need to rename files. Java provides the File class to handle file operations, and its renameTo() function can easily rename files. This article will introduce how to use Java's File.renameTo() function to rename files and provide corresponding code examples. The File.renameTo() function is a method of the File class.

Windows11 VBS Tutorial: How to gracefully close applications? Windows11 VBS Tutorial: How to gracefully close applications? Mar 08, 2024 am 11:54 AM

Windows 11 VBS Tutorial: How to gracefully close applications? When using the Windows 11 operating system daily, we often encounter situations where we need to close multiple applications at the same time. Sometimes we may habitually click the close button, or use the task manager to end application processes one by one. However, using VBS script (VisualBasicScript) can more efficiently close multiple applications at once, making the operation smoother and more convenient. 1.What is

Windows Script Host error 'The system cannot find the file specified' fix Windows Script Host error 'The system cannot find the file specified' fix Apr 13, 2023 pm 12:22 PM

Windows Script Host provides users with an environment for executing scripts. Some scripts execute as soon as you log into your computer, and others may execute when you trigger them. When you log into your computer and then find an error saying "The system cannot find the file specified" error, this article will help you troubleshoot the problem. Well, the reasons for this problem can be different like malware attack or improper installation or some files have been deleted etc. Here we have different solutions that you can try and solve your problem, so let's get started! Method 1 – Download the autorun utility and check vbs entries Step 1 – Go to this website and click on the download icon in the upper right corner and save Step 2 – After downloading the folder

See all articles