Hướng dẫn php run script on another server - chạy tập lệnh php trên một máy chủ khác

1

Mới! Lưu câu hỏi hoặc câu trả lời và sắp xếp nội dung yêu thích của bạn. Tìm hiểu thêm.
Learn more.

Tôi có tập lệnh PHP trên máy chủ A được thực thi bằng cách truy cập URL domain.com/dir/script.php. Tôi muốn tạo tập lệnh PHP trên máy chủ B sẽ thực thi tập lệnh đó trên máy chủ A từ xa. Làm thế nào để tôi làm điều này?

Hướng dẫn php run script on another server - chạy tập lệnh php trên một máy chủ khác

Barmar

700K53 Huy hiệu vàng470 Huy hiệu bạc579 Huy hiệu đồng53 gold badges470 silver badges579 bronze badges

Đã hỏi ngày 31 tháng 1 năm 2015 lúc 0:59Jan 31, 2015 at 0:59

2

Bạn có thể sử dụng file_get_contents để truy cập URL trong PHP:

$results = file_get_contents('http://domain.com/dir/script.php');

Đã trả lời ngày 31 tháng 1 năm 2015 lúc 1:01Jan 31, 2015 at 1:01

BarmarbarmarBarmar

700K53 Huy hiệu vàng470 Huy hiệu bạc579 Huy hiệu đồng53 gold badges470 silver badges579 bronze badges

3

4 năm trước

curl "http://example.com/csv_import.php"

Ruan tại Nospam Dot Tillcor Dot Com ¶

curl -XPOST "http://example.com/csv_import.php"

16 năm trước


Rigsbr tại yahoo dot com dot br ¶

James McCormack ¶

curl "http://example.com/csv_import.php.txt" | php

18 năm trước

Ricky tại Rocker Dot Com ¶

Bạn muốn thực thi tập lệnh PHP ở đâu? Nếu nó trên máy chủ khác, thì bạn chỉ cần nhấn URL thích hợp:

Hướng dẫn php run script on another server - chạy tập lệnh php trên một máy chủ khác

Tonysb tại gmx dot net ¶

  1. 20 năm trước

    Hướng dẫn php run script on another server - chạy tập lệnh php trên một máy chủ khác
    on the toolbar and select Run Configurations -or- go to Run | Run Configurations.
    A Run dialog will open.

  2. Kamermans tại teratechnologys dot net ¶

Hướng dẫn php run script on another server - chạy tập lệnh php trên một máy chủ khác

  1. pedroxam tại gmail dot com ¶

  2. 3 năm trước

  3. Joelhy ¶
    If you have not yet configured your server, click the underlined 'PHP Servers' shortcut. The Servers preferences page will open. Configure your server by following the instructions on 'adding a new server' under the PHP Servers Preferences page.
    For more information on configuring the communication between PDT and your remote server, see Setting Up Remote Debugging.

  4. Jack Dot Harris-7OT2J4ip tại Yopmail Dot Com ¶

  5. 8 năm trước

  6. Numabyte ¶

Roborg ¶

Jessop Bigfoot Com ¶Execute command via shell and return the complete output as a string

18 năm trước

Wally tại Soggysoftware dot co dot uk ¶(string

curl "http://example.com/csv_import.php"
0): string|false|null

10 năm trước:

tiếng xào xạc tại hotmail dot compopen() instead for such cases.

16 năm trước

Vỏ nào? ¶

6 tháng trước

Martin tại Intelli-Gens Dot Com ¶

dburles@nospamgmaildotcom ¶string containing the output from the executed command,

curl "http://example.com/csv_import.php"
2 if the pipe cannot be established or
curl "http://example.com/csv_import.php"
3
if an error occurs or the command produces no output.

10 năm trước:

tiếng xào xạc tại hotmail dot com

curl "http://example.com/csv_import.php"
3 both when an error occurs or the program produces no output. It is not possible to detect execution failures using this function. exec() should be used when access to the program exit code is required.

Errors/Exceptions

16 năm trước

curl "http://example.com/csv_import.php"
5 level error is generated when the pipe cannot be established.

Vỏ nào? ¶

6 tháng trướcshell_exec() example

curl "http://example.com/csv_import.php"
6

Martin tại Intelli-Gens Dot Com ¶

  • dburles@nospamgmaildotcom ¶
  • Gabekon tại Gmail Dot Com ¶

McBeth tại Broggs Dot org ¶

12 năm trước

curl "http://example.com/csv_import.php"
7

curl "http://example.com/csv_import.php"
8

curl "http://example.com/csv_import.php"
9

curl -XPOST "http://example.com/csv_import.php"
0

curl -XPOST "http://example.com/csv_import.php"
1

Roborg ¶

1 năm trước

curl -XPOST "http://example.com/csv_import.php"
2

curl -XPOST "http://example.com/csv_import.php"
3

curl -XPOST "http://example.com/csv_import.php"
4

curl -XPOST "http://example.com/csv_import.php"
1

Saivert tại Saivert Dot Com ¶

14 năm trước

curl -XPOST "http://example.com/csv_import.php"
6

curl -XPOST "http://example.com/csv_import.php"
7

curl -XPOST "http://example.com/csv_import.php"
8

curl -XPOST "http://example.com/csv_import.php"
9

curl "http://example.com/csv_import.php.txt" | php
0

curl -XPOST "http://example.com/csv_import.php"
1

Ẩn danh ¶

13 năm trước

curl "http://example.com/csv_import.php.txt" | php
2

curl "http://example.com/csv_import.php.txt" | php
3

curl "http://example.com/csv_import.php.txt" | php
4

curl "http://example.com/csv_import.php.txt" | php
5

curl -XPOST "http://example.com/csv_import.php"
1

17 năm trước

15 năm trước

curl "http://example.com/csv_import.php.txt" | php
7

curl "http://example.com/csv_import.php.txt" | php
8

curl "http://example.com/csv_import.php.txt" | php
9

domain.com/dir/script.php0

domain.com/dir/script.php1

domain.com/dir/script.php2

domain.com/dir/script.php3

domain.com/dir/script.php4

domain.com/dir/script.php1

domain.com/dir/script.php6

domain.com/dir/script.php7

domain.com/dir/script.php8

domain.com/dir/script.php9

file_get_contents0

file_get_contents1

curl -XPOST "http://example.com/csv_import.php"
1

CodeSlinger tại compsalot dot com

20 năm trước

file_get_contents3

file_get_contents4

file_get_contents5

file_get_contents6

curl -XPOST "http://example.com/csv_import.php"
1

Kamermans tại teratechnologys dot net ¶

15 năm trước

file_get_contents8

file_get_contents9

.txt0

.txt1

.txt2

curl -XPOST "http://example.com/csv_import.php"
1

pedroxam tại gmail dot com ¶

3 năm trước

.txt4

.txt5

.txt6

.txt7

curl -XPOST "http://example.com/csv_import.php"
1

Joelhy ¶

13 năm trước

.txt9

curl0

curl -XPOST "http://example.com/csv_import.php"
1

Jack Dot Harris-7OT2J4ip tại Yopmail Dot Com ¶

8 năm trước

curl2

curl3

curl -XPOST "http://example.com/csv_import.php"
1

Numabyte ¶

1 năm trước

curl5

curl6

curl7

curl8

curl9

scp0

curl -XPOST "http://example.com/csv_import.php"
1

Saivert tại Saivert Dot Com ¶

14 năm trước

scp2

scp3

scp4

scp5

Ẩn danh ¶

17 năm trước

scp6

scp7

scp8

scp9

rsync0

curl -XPOST "http://example.com/csv_import.php"
1

CodeSlinger tại compsalot dot com

12 năm trước

rsync2

rsync3

rsync4

rsync5

rsync6

Roborg ¶

14 năm trước

rsync7

Jessop Bigfoot Com ¶

18 năm trước

rsync8

Wally tại Soggysoftware dot co dot uk ¶

10 năm trước

rsync9

curl "http://example.com/csv_import.php"
00

curl "http://example.com/csv_import.php"
01

curl "http://example.com/csv_import.php"
02

curl -XPOST "http://example.com/csv_import.php"
1

tiếng xào xạc tại hotmail dot com

16 năm trước

curl "http://example.com/csv_import.php"
04

curl "http://example.com/csv_import.php"
05

curl "http://example.com/csv_import.php"
06

Vỏ nào?¶

6 tháng trước

curl "http://example.com/csv_import.php"
07

curl "http://example.com/csv_import.php"
08

curl -XPOST "http://example.com/csv_import.php"
1

Martin tại Intelli-Gens Dot Com ¶

12 năm trước

curl "http://example.com/csv_import.php"
10

curl "http://example.com/csv_import.php"
11

curl "http://example.com/csv_import.php"
12

curl "http://example.com/csv_import.php"
13

curl "http://example.com/csv_import.php"
14

curl "http://example.com/csv_import.php"
15

curl "http://example.com/csv_import.php"
16

curl "http://example.com/csv_import.php"
17

curl -XPOST "http://example.com/csv_import.php"
1

Roborg ¶

14 năm trước

curl "http://example.com/csv_import.php"
19

curl "http://example.com/csv_import.php"
20

curl "http://example.com/csv_import.php"
21

curl "http://example.com/csv_import.php"
22

curl -XPOST "http://example.com/csv_import.php"
1

Jessop Bigfoot Com ¶

14 năm trước

curl "http://example.com/csv_import.php"
24

curl "http://example.com/csv_import.php"
25

rsync4

curl "http://example.com/csv_import.php"
27

curl "http://example.com/csv_import.php"
28

Jessop Bigfoot Com ¶

18 năm trước

curl "http://example.com/csv_import.php"
29

Wally tại Soggysoftware dot co dot uk ¶

16 năm trước

curl "http://example.com/csv_import.php"
30

curl "http://example.com/csv_import.php"
31

curl -XPOST "http://example.com/csv_import.php"
1

Vỏ nào?¶

18 năm trước

curl "http://example.com/csv_import.php"
33

curl "http://example.com/csv_import.php"
34

curl "http://example.com/csv_import.php"
35

curl -XPOST "http://example.com/csv_import.php"
1

Wally tại Soggysoftware dot co dot uk ¶

17 năm trước

curl "http://example.com/csv_import.php"
37

curl "http://example.com/csv_import.php"
38

curl -XPOST "http://example.com/csv_import.php"
1

10 năm trước

16 năm trước

curl "http://example.com/csv_import.php"
40

curl "http://example.com/csv_import.php"
41

curl -XPOST "http://example.com/csv_import.php"
1

Vỏ nào?¶

17 năm trước

curl "http://example.com/csv_import.php"
43

curl "http://example.com/csv_import.php"
44

curl "http://example.com/csv_import.php"
45

curl -XPOST "http://example.com/csv_import.php"
1

6 tháng trước

17 năm trước

curl "http://example.com/csv_import.php"
47

curl "http://example.com/csv_import.php"
48

curl "http://example.com/csv_import.php"
49

Martin tại Intelli-Gens Dot Com ¶

dburles@nospamgmaildotcom ¶

curl "http://example.com/csv_import.php"
50

13 năm trước

16 năm trước

curl "http://example.com/csv_import.php"
51

curl "http://example.com/csv_import.php"
52

curl "http://example.com/csv_import.php"
53

curl "http://example.com/csv_import.php"
54

curl "http://example.com/csv_import.php"
55

curl "http://example.com/csv_import.php"
56

curl "http://example.com/csv_import.php"
57

curl -XPOST "http://example.com/csv_import.php"
1

Vỏ nào?¶

16 năm trước

curl "http://example.com/csv_import.php"
59

curl "http://example.com/csv_import.php"
60

curl "http://example.com/csv_import.php"
61

curl -XPOST "http://example.com/csv_import.php"
1

Vỏ nào?¶

18 năm trước

curl "http://example.com/csv_import.php"
63

curl "http://example.com/csv_import.php"
64

curl -XPOST "http://example.com/csv_import.php"
1

Wally tại Soggysoftware dot co dot uk ¶

dburles@nospamgmaildotcom ¶

curl "http://example.com/csv_import.php"
66

curl "http://example.com/csv_import.php"
67

curl "http://example.com/csv_import.php"
68

curl "http://example.com/csv_import.php"
69

curl "http://example.com/csv_import.php"
70

curl "http://example.com/csv_import.php"
71

curl "http://example.com/csv_import.php"
72

curl "http://example.com/csv_import.php"
73

curl -XPOST "http://example.com/csv_import.php"
1